How to download youtube videos from the terminal

One of our readers asked me a very interesting question the other day: how do I Download videos de youtube ? Well, the truth is that there are a lot of alternatives in Linux: from extensions to Firefox to tools that can be used directly from the terminalIn this case, I would like to share with you one of those tools that can be executed from the terminal, which stands out for its incredible simplicity and ease of use.

Installation and use

In Ubuntu, I opened a terminal and wrote:

sudo apt-get install youtube-dl

For its use, I simply wrote:

youtube-dl video_url

For example:


You will see a result similar to the following:

[youtube] Setting language [youtube] 6kWB3Vl_xRI: Downloading video webpage [youtube] 6kWB3Vl_xRI: Downloading video info webpage [youtube] 6kWB3Vl_xRI: Extracting video information [.download.] Destination: 6kWB3Vl_xRI.mp4 [.download.] 100.0% of 31.01M at 923.68k / s ETA 00:00

Ready, the video will be stored in the folder that we execute the command.

Source: we're free

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

36 comments, leave yours

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Jamin fernandez said

    Jdowloader does it for me xD

    1.    Khalid said

      When I want to download a YouTube video, I just have to open the video and add »DL» before YouTube in the URL and press ENTER .. then I select the quality I want and I can download the video as mp3. And it also works with my phone

  2.   Hector said

    thanks! my grateful daughters, haha

  3.   Let's use Linux said

    It is another good alternative!
    Greetings Saito!

  4.   Saito Mordraw said

    Excellent entry.

    What I use is a minitube that works great.

    greetings = D

  5.   Bayonne Miguel said


  6.   torwar said

    Smplayer incorporates smtube that allows you to watch and download YouTube videos. But this option that arises is interesting for those who like to use the command terminal.

  7.   Daniel said

    There is also movgrab, with it you can choose the format and quality of the video to download, it is fast, light and totally made in C so you don't require any kind of dependency.

    This is your site, I wish they made a post about this application


  8.   Matthias Castellino said

    The ClipGrab program works very well for me Apart from being able to download them through a graphical interface, you can tell it to convert them to another format at the same time or download, for example, only the audio in MP3 format. Cheers!

  9.   Jose Aristizabal said

    Good date…
    Another one that has worked very well for me is clive. Look at it and tell me….

  10.   myself said

    and how do I guess the url of the video from the console?

  11.   Guajara Rock said

    To download the videos in the best quality ...
    youtube-dl –max-quality FORMAT url of the video

    Youtube-dl help: youtube-dl –help
    and all possible commands will appear. 🙂

  12.   MA Geoffrey BETANCOURTH J. said

    But in what format and resolution does it lower the Videos ??? And can I also download the videos even with area restriction ???
    PS very good post more and more I like linux

  13.   Let's use Linux said

    Good date!

  14.   otto06 said

    tremendous utility, if you want to download the video with its title just add -t

    youtube-dl -t

    You can also download in other formats, etc ...

  15.   andrwm100 said

    very good contribution for those who like me are new to this so

  16.   Leo..77 said

    This error doesn't work for me ……… ..root @ jorleo-Aspire-4732Z: / home / jorleo / Documents # youtube-dl
    [1] 6917
    root @ jorleo-Aspire-4732Z: / home / jorleo / Documents # [youtube] Setting language
    [youtube] watch: Downloading video webpage
    ERROR: unable to download video webpage: HTTP Error 404: Not Found

    [1] + Output 1 youtube-dl

  17.   Jerry said

    Simple ... and 100% functional
    Thank you very much

  18.   mauro said

    How do I solve this: c I only get this
    [youtube] Setting language
    [youtube] hS2KCZIinMw: Downloading video info webpage
    [youtube] hS2KCZIinMw: Extracting video information
    ERROR: format not available for video

  19.   Mauro said

    this is all that happens
    student @ User: / usr / bin $ sudo apt-get install youtube-dl
    Reading package list ... Done
    Creating dependency tree
    Reading the status information ... Done
    Suggested Packages:
    The following NEW packages will be installed:
    0 updated, 1 will be installed, 0 to remove, and 0 not updated.
    I need to download 25,0kB of files.
    119kB of additional disk space will be used after this operation.
    Des: 1 lucid / universe youtube-dl 2010.04.04-1 [25,0kB]
    Downloaded 25,0kB in 1s (19,1kB / s)
    Selecting the previously unselected youtube-dl package.
    (Reading the database ... 00%
    142270 files and directories currently installed.)
    Unpacking youtube-dl (from… / youtube-dl_2010.04.04-1_all.deb)…
    Processing triggers for man-db ...
    Setting up youtube-dl (2010.04.04-1) ...
    student @ User: / usr / bin $ youtube-dl
    [youtube] Setting language
    [youtube] hS2KCZIinMw: Downloading video info webpage

  20.   selkie said

    "ERROR: unable to download video"
    appears when trying to download the video.

    1.    let's use linux said

      Hello! Look, this article is 2 years old and may be out of date. In other words, the method explained here no longer works. I'm sorry.
      A hug! Paul.

  21.   Enrique said

    I loved you!
    It works wonders!

  22.   Eugenia said

    Thank you very much, you have no idea how much this helps me !!!

  23.   The power corrupts (almost always) said

    Thank you very much for this explanation, it is easy and useful.

    1.    let's use linux said

      You're welcome, you're welcome! That is what we are for ... 🙂
      A hug! Paul.

  24.   bruce said

    hello .. this works but I want to know how to reuse it after closing it .. is it necessary to make a call to the command__? as?

  25.   gonzalez said

    hooola very good but I want to know if there is something similar but to download the audio only the audio ah very good contribution

  26.   Jd said

    WARNING: Automatic signature extraction failed: Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/", line 957, in _decrypt_signature
    video_id, player_url, len (s)
    File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/", line 331, in _extract_signature_function
    player_type = ('ext')
    AttributeError: 'NoneType' object has no attribute 'group'

    WARNING: Warning: Failing back to static signature algorithm
    WARNING: Automatic signature extraction failed: Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/", line 957, in _decrypt_signature
    video_id, player_url, len (s)
    File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/", line 331, in _extract_signature_function
    player_type = ('ext')
    AttributeError: 'NoneType' object has no attribute 'group'

    WARNING: Warning: Failing back to static signature algorithm
    ERROR: unable to download video data: HTTP Error 403: Forbidden

    How do I solve it? 😛

  27.   heckctor said

    It still works! Thanks a lot.

  28.   King said

    I use Clive and it can be installed from the console or from the Package Manager. But if they want to install it through the terminal, we put:
    sudo apt-get install clive
    Then, to download videos from youtube, we will put:
    clive + the url of youtube, for example: clive (by the way, that url is from a very good French movie 😉
    There are those who do not work with clive, in that case, we will put it, with double c:
    slope, as in the previous case.
    And if they want to know what video formats are available, they run:
    clive -f and this will appear:

    fmt05_240p|fmt17_144p|fmt18_360p|fmt22_720p|fmt36_180p|fmt43_360p :
    After that, the next step:
    cclive -f fmt05_240p They can choose any other format they want.

    And voila, to see the movie.

  29.   Ivan Ucha Ramirez said

    Greetings to all, the tool is very interesting, from the terminal it is much faster and better, although there are thousands of better tools and with more options, such a simple thing although at the same time it is very complex, because it has many options.

    I just met her, because I did not know her and the truth is I loved it;), hold on linux always;).

  30.   Francisco said

    Excellent information, it is incredible that every time you learn more about Linux, the program download it in Manjaro, use it without any problem, very good, thank you, greetings.

  31.   Francisco said

    Excellent information, each time you learn more about Linux, it is in the Manjaro repositories, very good, download a video without any problem, thanks, greetings.

  32.   Fox mulder said

    Thank you. Cash

  33.   Anz said

    Thank you very much.

bool (true)