The Most Awesome Way to Download Youtube Videos in Linux

There are many ways for downloading Youtube videos that work on almost all operating systems, I know that most of you, geeky people, know a buch of them; but what I am going to show in this post is how to dowload Youtube videos more awesomely using Linux ;)

To do this, you need to install a package called youtube-dl from Ubuntu’s official repositories, just look up for it in the software center or you can visit the official website if you’re using another distro.


What makes youtube-dl awesome is that it doesn’t have a GUI :D, to use it, you need to launch a terminal window.

This is an example of how to download a video:

youtube-dl -f 18

-f parameter let you choose the format of the video, in this example the format is18, which means 320p. A full list of formats and their numbers can be found here.

Another parameters can be added, the ones I use the most are –extract-audio and –audio-format; the first one lets you get only the audio from the video file, the second one lets you choose the output file output format; here’s an example:

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

More tips can be found in the official documentation.

  • Instigator

    Seems to be a constant cat-n-mouse game here … as of late June 2013 Youtube implemented an update that has broken most – if not all – downloaders, including this one. Time for you guys to go back to the drawing-board and see if you can get this working again.
    Thanks !

  • Mike trike

    its june 29th 2013 this still doesnt work!

    • Mohamed Semlali

      I tested it again, and it’s still working. Could you specify what is not working for you ?

  • likes_command_lines

    It works for me. I just downloaded youtube-dl to a local directory and gave it the execute permission ( chmod u+x youtube-dl ).

    I ran it with no options, It works when you embed the URL in quotes.

    example :

    youtube-dl “”

  • Mohamed Semlali

    It seems that Youtube changed the signature. Try updating (or reinstalling) youtube-dl

  • pradeep

    I have downloaded the latest version of youtube-dl from the original site and installed in ~/bin directory. It works.

    curl -o youtube-dl

    chmod u+x youtube-dl

  • Raffaele Faberfortunaesuae Car

    I wanted to download the mp3 from a youtube video and it worked for me only doing this 2 steps:

    1) sudo wget -O /usr/local/bin/youtube-dl

    2) youtube-dl –extract-audio –audio-format mp3 “URL TO DOWNLOAD”

  • Enol Homer

    Just downloaded the latest youtube-dl today after installing the package.

    1. sudo apt-get install youtube-dl

    2. sudo wget -O /usr/bin/youtube-dl

    I might have to redo the above steps when YT blocks the youtube-dl again.

  • Waffa

    How come this makes something cool if they have no GUI? Get real people : )
    Extra command line might be cool, but not having something is minus, seriously

    Lets make one now

  • krishna

    hey is there any rpm for dowonload youtube videos it’s just like a IDM in windowd
    plz reply