Install YouTube-DL – A Command Line Video Download Tool for Linux

youtube-dl is a Python based small command-line tool that allows to download videos from, Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites. It written in pygtk and requires Python interpreter to run this program, it’s not platform restricted. It should run on any Unix, Windows or in Mac OS X based systems.

Recently, youtube-dl added video download support for 17 new websites:,, RingTV,, Jukebox, 3sat, CSpan,,,,,,,,, and

youtube-dl also allows to choose specific avialable video quality format to download or let the program itself automatically download higher quality video from the site. It also has supports for user specific playlist downloads, options to add custom or original title to the downloaded video file. proxy support and many more.

Linux Commandline YouTube Video Download
Download YouTube Videos in Linux

Install YouTube-DL in RHEL/CentOS and Fedora

The youtube-dl program can be installed by enabling epel repository under your systems. Once enabled, you can install using ‘yum‘ package manager tool as shown.

# yum install youtube-dl

Update: If you don’t wish to add any third party repository, you can still install it right away using curl or wget command as shown.

# curl -o /usr/local/bin/youtube-dl
# wget -O /usr/local/bin/youtube-dl

Note: Your system must have curl or wget packages installed to fetch the recent version youtube-dl file. If you don’t have them, you may yum to get it.

After fetching the file, you need to set a executable permission on the script to execute properly.

chmod a+rx /usr/local/bin/youtube-dl

Install YouTube-DL in Ubuntu/Linux Mint and Debian

Ubuntu users can download and install latest youtube-dl version from the webupd8 PPA as shown.

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl

Update: Similarly, instead using any third party PPA, you can use curl or wget command to install latest version of youtube-dl script as shown.

$ sudo curl -o /usr/local/bin/youtube-dl
sudo wget -O /usr/local/bin/youtube-dl

After downloading the script, set the executable permission.

$ sudo chmod a+rx /usr/local/bin/youtube-dl

Update YouTube-DL

Youtube-dl itself can be updated to the latest version using the following command.

# youtube-dl -U
Sample Output
Updating to version 2015.09.03 ...
Updated youtube-dl. Restart youtube-dl to use the new version.

How to Use YouTube-DL to Download Videos

To download a video file, simply run the following command. Where “VIDEO_URL” is the url of the video that you want to download.

# youtube-dl
Sample Output
[youtube] iRYvuS9OxdA: Downloading webpage
[youtube] iRYvuS9OxdA: Downloading video info webpage
[youtube] iRYvuS9OxdA: Extracting video information
[youtube] iRYvuS9OxdA: Downloading js player new-en_US-vflCeB3p5
[youtube] iRYvuS9OxdA: Downloading DASH manifest
[download] Destination: Amy Macdonald - This Is The Life-iRYvuS9OxdA.mp4
[download] 100% of 10.33MiB in 00:01

To list all available formats of video, use option “–list-formats” with the youtube-dl command.

# youtube-dl --list-formats
Sample Output
[youtube] vKtwZmhX0lw: Downloading webpage
[youtube] vKtwZmhX0lw: Downloading video info webpage
[youtube] vKtwZmhX0lw: Extracting video information
[youtube] vKtwZmhX0lw: Downloading DASH manifest
[youtube] vKtwZmhX0lw: Downloading DASH manifest
[info] Available formats for vKtwZmhX0lw:
format code  extension  resolution note
171          webm       audio only DASH audio  113k , [email protected] (44100Hz), 1.86MiB
140          m4a        audio only DASH audio  128k , m4a_dash container, aac  @128k (44100Hz), 2.14MiB
141          m4a        audio only DASH audio  255k , m4a_dash container, aac  @256k (44100Hz), 4.30MiB
278          webm       180x144    DASH video   63k , webm container, vp9, 1fps, video only, 946.76KiB
160          mp4        180x144    DASH video  112k , avc1.4d400c, 15fps, video only, 1.86MiB
242          webm       300x240    DASH video  170k , vp9, 1fps, video only, 2.50MiB
133          mp4        300x240    DASH video  247k , avc1.4d400d, 25fps, video only, 4.11MiB
243          webm       400x320    DASH video  288k , vp9, 1fps, video only, 4.07MiB
13           3gp        unknown    small 
17           3gp        176x144    small ,  mp4a.40.2, mp4v.20.3
36           3gp        320x240    small ,  mp4a.40.2, mp4v.20.3
5            flv        400x240    small 
43           webm       640x360    medium ,  vorbis, vp8.0
18           mp4        640x360    medium ,  mp4a.40.2, avc1.42001E (best)

To download a preferred file format, use the option ‘-f’ (video format code). For example, I would like to download mp4 format, So I use format code as ‘18‘ as shown below.

# youtube-dl -f 18
Sample Output
[youtube] iRYvuS9OxdA: Downloading webpage
[youtube] iRYvuS9OxdA: Downloading video info webpage
[youtube] iRYvuS9OxdA: Extracting video information
[youtube] iRYvuS9OxdA: Downloading DASH manifest
[download] Amy Macdonald - This Is The Life-iRYvuS9OxdA.mp4 has already been downloaded
[download] 100% of 10.33MiB

To download a list of video files, create a file and place all the YouTube links that you wish to download.

# youtube-dl -a youtube_links.txt

Type the following command in a terminal to list all the avialable options.

# youtube-dl --help

For other distributions, youtube-dl can be downloaded from the youtube-dl download page.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

69 thoughts on “Install YouTube-DL – A Command Line Video Download Tool for Linux”

  1. Is there a way to get the current image from a live stream using youtube-dl? If not can you direct me to a command line application that can do this in Linux.

    I am trying to capture an image from a live feed every 60 seconds so I can create a timelapse of the day.


  2. youtube-dl is pretty slow to start downloading or getting video title only (about 10s) on seagate dockstar, even after decompress.
    What should I do to speed it up?

    • @Skyrail,

      I use Youtube-DL everyday to download some videos or extract mp3 songs, but I never seen any slowness, it always fast…

  3. Hi, I’m using Linux Mint for an operating System ! recently I have not been able to download Youtube Video ?? I have tries everything My small brain could come up with & no results ?? Anyone out there have any ideas ? Thanks in advance, Mike

  4. You may try use Allavsoft to download 3sat TV programs, movies and other video clips in batch to your computer, laptop, tablet, mobile phone, iPad, PSP, Zune, X360, Smart TV, etc.

  5. Do we have a limit call when using youtube-dl to request to Youtube. I’m afraid that Google might block me since I request many times.

    • @Trung,

      No any limits applied by YouTube or Google, you can download as many as videos, like I do regularly download videos or mp3 tracks from Youtube without any trouble or issues..

    • @Gilvan,

      Yes, you can download list of videos from specific playlist, just check out the man pages of Youtube-DL here:

      # youtube-dl --help

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.