youtube-dl – download Youtube videos from linux command Line

Youtube-dl is a small command-line program to download videos from YouTube website and other sites that don’t provide direct links to the videos served.

youtube-dl allows the user, among other things, to choose a specific video quality to download (if available) or let the program automatically determine the best (or worst) quality video to grab. It supports downloading entire play lists and all videos from a given user.

In this article we will discuss how to install youtube-dl and download youtube videos in Ubuntu linux

Installation of youtube-dl Using Synaptic Package Manager :

Open the Synaptic Package Manager , search youtube-dl , as shown below :


Click on youtube-dl and  Select  ‘Mark for Installation’ , then click on Apply.

Installation of youtube-dl from the terminal

Open the the terminal type the below command

#  sudo apt-get install youtube-dl

Download Videos using youtube-dl

Step1: Go to youtube website and search the video that you want to download

Step:2 Copy the Video URL from the browser’s navigation(address) bar .

Open the terminal  type below Command :

# youtube-dl <video URL>

 # youtube-dl


Download Videos in the format of your Choice

# youtube-dl -F  {video URL}

Example :

# youtube-dl -F


Suppose You want to download ‘mp4’ format , then  use the below Command

# youtube-dl -f  {format code} {video URL}

So as per above ouput mp4 format code is 18.

# youtube-dl -f  18

Download list of videos using youtube-dl

To download a list of video files,  first create a file & place all the video urls  that you want to download.

# youtube-dl -a videos_url.txt

Update YouTube-DL

youtube-dl itself can be updated to the latest version using the below command.

# youtube-dl -U

1 thought on “youtube-dl – download Youtube videos from linux command Line”

Leave a Comment