How To download Youtube videos and Playlists in Ubuntu


Today we will learn how to download YouTube videos as video or Mp3, using youtube-dl, as well as how to download full YouTube playlists.


Step 1
Connect to your server as the admin user via SSH or open a command prompt.

ssh [email protected]
Step 2
We will download the latest youtube-dl to make sure we have the latest one

If in the future youtube-dl stops working repeat these command to update it to the latest version
sudo wget -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Step 3

Downloading as Video

Pretty Simple just run the command on the url you want to download and youtube-dl will download the video in the best quality available, try to chose a video that offers HD quality for best results.


Downloading as Mp3

This command will extract the audio only and save it as Mp3

youtube-dl --extract-audio --audio-format mp3

Downloading Full Playlists

This is probably the most powerfull feature of youtube-dl, as it allows us to download multiple files with one command.


Make sure to get the playlist Full list URL not the individual video

Full Playlist URL

Downloading as video

To download the full playlist run this command

youtube-dl -cit

Downloading as Mp3

To download the full playlist as Mp3 run this command

youtube-dl -cit --extract-audio --audio-format mp3

That's It if you have any questions or comments please post in the bottom of this post.

10$ off on me with This Link, if you don't have your own server visit DigitalOcean servers starting at 5$ a month
10$ off on me with

Jaco Toledo

Hi, I am a System Administrator that Lives in Jacksonville Florida and loves to experiment with anything IT, my favorite Linux Distro is Ubuntu I Love its simplicity.

Jacksonville, FL

Subscribe to UbuntuBoss: Easy Ubuntu Tutorials | How to for Ubuntu Linux

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!