Home / Tech Gadgets & Electronics / How to download videos from YouTube, Facebook and other sites using the terminal in Windows, Linux or Mac
how-to-download-videos-youtube-facebook-sites-using-terminal-windows-linux-mac

How to download videos from YouTube, Facebook and other sites using the terminal in Windows, Linux or Mac

There are many reasons why someone would want to download the videos that are available on the Internet and there are many methods that work. We’ve told you more than a dozen ways to download YouTube videos, or some tricks to download Facebook videos.

However, this form is definitely more “cool” and works almost everywhere. In addition, it is extremely simple even though for many the word “terminal” does not combine with ease. Thanks to youtube-dl , a simple program for the command line, you can download videos from dozens of websites, including pages like Pornhub.

Although its name would seem to indicate that it is made to download YouTube videos, the list of sites supported by this tool is very long and ranges from news websites, Internet TV, entertainment, social networks, music, sports and even porn.

Installation and use (Windows, Linux, macOS)

In Windows download this executable and leave it in any folder other than C: \ Windows \ System32. Just remember that the folder where you download that executable should be the same where you will download the videos.

Execute the .exe, in Windows 10 the filter may block the installation, so you must trust the program by clicking on “More information” and execute anyway. My recommendation is to save it in your personal folder, the one with your user name, as it is usually the default location in the command prompt and so you have to work less.

Once executed, not much happens, just open and close a window of the terminal. Click on the start button and type “Command Prompt” to open the Windows terminal and the following is simply to write:

youtube-dl URL

System Symbol 2018 07 05 16 53 25

That is, only the command youtube-dl followed by the address of the video you want to download and ready.

In macOS it is even simpler. You just have to open the terminal and paste the following commands:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Hyper 2018 07 05 14 20 30

Once this is done you can use the youtube-dl command to download any video.

In Linux you can use wget to install the program, you just have to type two commands in the terminal:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Download in multiple formats, subtitles and even playlists

Youtube-dl has many useful commands to not only download the MP4 file of a video in a few seconds, but you can do things like download all the available formats of the same video using the command --all-formats.

You can also do things like write subtitles in the file automatically using --write-subor --write-auto-sub. Or, download also all available subtitles for the video using --all-subs.

You can see the huge list of options on the youtube-dl page on GitHub.

About Nick Fury

Hi, I am Nick! Apart from being a loving husband and a father of one, I dedicate myself to manage a company full time. Writing is my passion, I started writing a blog some 10 years ago, now reviving this passion again, I would love to express my views and takes on day to day stuff, hope you guys enjoy! Do share your thoughts.

Check Also

Trump and Xi Jinping

Bad News For Huawei And Apple: Trump Orders Companies To Start Looking For Alternatives To China

When it seemed that the trade war between the United States and China had not intensified enormously, today both powers have taken …

Let us know about your thoughts below!

%d bloggers like this: