[HOWTO] Download youtube video from command-line

Linux is awesome and so is the terminal. Things become a lot more easy if you can just type in few commands and get your work done. Downloading youtube video has always been messy with GUI downloaders, browser extensions and web services which claim to give you the download link to that video. Now, you can download it from the terminal using youtube-dl in ubuntu. You can also download and install it in other flavors of linux. The script is written in python.

Install youtube-dl from the official repository in Ubuntu:

sudo apt-get install youtube-dl

To download a video execute the following:

youtube-dl <url>

Example screenshot:

More options and switches:

-b            Best quality
-m            Mobile version
-d            High Definition
-g            Don’t download, just show the url
-c            Resume download of a video which was interrupted before
-w            Don’t overwrite existing file

For complete list of switches execute man youtube-dl in terminal.


Leave a Reply

Your email address will not be published. Required fields are marked *