If you have privacy concerns regarding Etcher (now known as balenaEtcher), here are some alternatives

We’ve used Etcher several times, mostly to make a bootable SD card for a Raspberry Pi or to put a bootable image of a Linux distribution onto a USB thumb drive. But we’re rethinking that now because we’ve read some concerns about privacy when using Etcher, or balenaEtcher as it is now called. Here are just three links where the issue is discussed:

What is a good replacement for Etcher (ads and ignores privacy) – from the Raspberry Pi Forums.
Serious Privacy Concerns with Etcher 1.4.4 – from forums.balena.io – in case that page disappears, it’s also archived here.
Etcher 1.4.4 Ignores Privacy Setting #2497 – from Github – also archived here.

Some users have opined that balenaEtcher might violate GDPR regulations in Europe (see for example balenaEtcher and privacy/GDPR #1266 from Github), but balena appears to disagree. We are neither lawyers nor European residents, so we are staying out of that dispute. All we wanted to point out is that if you do have any concerns about using Etcher or balenaEtcher, there are alternatives, depending on which operating system you are using:

Windows: The program to use here is Rufus – their tag line is “Create bootable USB drives the easy way”:


Mac: A program called ApplePi-Baker v2 is a great alternative. It’s designed to allow backing up an SD card, but the “Restore” function allows you to to create a bootable SD card or USB drive in a manner pretty similar to how it’s done in Etcher:


ApplePi-Baker v2 is actually a much more capable program than Etcher. For example, if you are creating a Raspbian Lite image to use as a server on a Raspberry Pi, you may want to enable ssh access. To do that just go to the Additional Functions and Options settings and “Enable SSH”:

One other option on a Mac is to keep using Etcher or balenaEtcher, but use Little Snitch to block all outgoing connections. It will still try to go out to various Internet sites, but Little Snitch should stop it in its tracks. However, Little Snitch is not free software, so unless you’ve already purchased it for other reasons, this might not be be the best option.

Linux: Some users (generally those who love using the command line) swear that using dd is the answer. One example we saw posted was this:

dd if=/path-to-image of=/path-to-sdcard

Sometimes other options are also shown, for example to specify a block size. The problem with that is that is that if you make a mistake while using dd, for example by mixing up the paths, you can destroy your hard drive! This is why some people say that “dd” stands for “Drive Destroyer” – they’re sort of joking, but pointing out a serious problem for inexperienced users trying to use dd! If you are trying to create a bootable SD card for a Raspberry Pi, this article explains how to do it using dd: Installing operating system images on Linux. Unless you are an experienced Linux user, we do not recommend using dd if any other alternative is available, due to the potential for inadvertent destruction of data you want to keep – of course this can also happen with other software, but dd just makes it too easy to destroy your hard drive if you are not paying close attention!

If you are running Ubuntu, there is a better option: Use the Startup Disk Creator utility that’s included with Ubuntu. Other versions of Linux may have the same or a similar utility installed, or available for download in their repository.

This How-To Geek article explains your options: How to Burn an ISO File to a USB Drive in Linux. While the article specifically talks about ISO files and USB drives, the same techniques should work for IMG files (with the .img extension) and SD cards. Note that if the files are compressed you will probably need to expand them first to get the actual .iso or .img file. In some cases you may need to format or re-format the USB drive or SD card first, but there are many tutorials available, as well as videos on YouTube, that show how to do that in Linux.

More options: If none of the above work for you, there are other options, though some require a greater level of technical expertise than those mentioned above. You can easily find several of them at this page on the AlternativeTo site. Many of them are not as user-friendly as the ones shown above.

How to install and run youtube-dl from actual source code, so that you can apply patches as needed

If you use the program youtube-dl, you may have noticed that from time to time things stop working.  Usually it’s because something changes on a site and youtube-dl needs to be patched to deal with it.  But what sometimes happens is that someone will submit a patch and then the youtube-dl developers will ignore that patch for many months before they finally get around to merging it into the program.  The speed at which the youtube-dl developers fix issues with sites can seem glacial at times.

What’s frustrating is that if you browse through the issues section of the youtube-dl support area using an appropriate search term, you may find the fix for your problem, and maybe it’s just been sitting there for quite some time. But, since youtube-dl is distributed as a compiled binary you may think you have no way to apply it.  But that’s not really true – at its core, the entire program is simply a multitude of Python scripts, and it can be run without first being compiled.  And if you use it that way, then you can apply patches as needed to any of the python modules, whether they are patches you have written or patches that you have found in the issues area, or elsewhere on the Internet.

So here is how you can install and use youtube-dl using actual source code.  Please don’t confuse this with other sites that show you how to “install from source” because in most cases what they are showing you how to do is install the binary from the developer’s source site rather than using an old version from your Linux distro’s repository, which is never a good idea since youtube-dl gets updated a lot.  I should mention here that since youtube-dl runs under Python, in theory it will run on any system that has a Python 2.6, 2.7, or 3.2+ interpreter available.  So although it is not Linux-specific, these instructions are aimed primarily at Linux users, and they will probably also work in MacOS. They should work in Windows, too, but we don’t do much in Windows so can’t say what additional steps might be involved.  And, many Linux distributions, as well as MacOS, have Python already included in their base installation, so we’re not going to tell you how to install Python if you don’t already have it.  Just type python --version from a command prompt and if python is already installed, it should tell you which version of Python you have.

So here’s the procedure: First, create a directory under your home directory, maybe call it ytdl, and change to that directory:

cd ~
mkdir ytdl
cd ytdl

There are two versions of the youtube-dl source code that can be obtained.  One is the source code only, and the other is the Full source + docs + binary, which is a much larger download but can be verified using a SHA256 checksum. You can use either one.

If you want the (larger) Full source + docs + binary version, do this: In a web browser go to the youtube-dl Download Page and look for the link that says Full source + docs + binary tarball:

Full source + docs + binary tarball link
That link is updated when new versions are released. Click it and download the resulting file, or right click on it and copy the link, and then in a terminal window use wget to get the file.  The file should be downloaded to or placed in the directory you just created.  For example:

cd ~/ytdl (only necessary if you have changed directories since the previous step)
wget https​://yt-dl.org/downloads/2019.04.17/youtube-dl-2019.04.17.tar.gz (but use the current link from the download page)

Optional, but highly recommended:  Check the SHA256 checksum to make sure it matches the one shown on the download page:

shasum -a 256 youtube-dl-2019.04.17.tar.gz

Then uncompress the file using tar xvzf:

tar xvzf youtube-dl-2019.04.17.tar.gz

The next step is to find the file __main__.py – this is the file you will actually run when using the source code (note that where you see __ in this article, that’s really two underscore characters side by side, even if the gap between them appears nonexistent). If you have followed the directions so far, it will probably be in the ~/ytdl/youtube-dl/youtube_dl directory, unless they change the directory tree in a future version. So try this:

~/ytdl/youtube-dl/youtube_dl/__main__.py --version

That should show you the version number of youtube-dl that you are running.

Now you should be able to use the same string to invoke the source code version of youtube-dl. The format is:
~/ytdl/youtube-dl/youtube_dl/__main__.py [options] [url]

Now scroll down to “Using aliases to avoid excessive typing” and continue from there. Where you see [path to __main__.py], substitute that with /home/username/ytdl/youtube-dl/youtube_dl/__main__.py but replace username with the name of your user directory (also, MacOS users should replace “home” with “Users”).

If you want the (smaller) source code only version, do this: In a web browser go to the youtube-dl GitHub Page and click the green “Clone or Download” button, then right click on the “Download Zip” button in the dropdown that appears and copy the link:

Location of Download Zip button

Then in a terminal window use wget to get the file. The file should be downloaded to or placed in the directory you just created. For example:

cd ~/ytdl (only necessary if you have changed directories since the previous step)
wget https://github.com/ytdl-org/youtube-dl/archive/master.zip

Then uncompress the file using unzip:

unzip master.zip

The next step is to find the file __main__.py – this is the file you will actually run when using the source code (note that where you see __ in this article, that’s really two underscore characters side by side, even if the gap between them appears nonexistent). If you have followed the directions so far, it will probably be in the ~/ytdl/youtube-dl-master/youtube_dl directory, unless they change the directory tree in a future version. So try this:

~/ytdl/youtube-dl-master/youtube_dl/__main__.py --version

That should show you the version number of youtube-dl that you are running.

Now you should be able to use the same string to invoke the source code version of youtube-dl. The format is:
~/ytdl/youtube-dl-master/youtube_dl/__main__.py [options] [url]

Where you see [path to __main__.py] below, substitute that with /home/username/ytdl/youtube-dl-master/youtube_dl/__main__.py but replace username with the name of your user directory (also, MacOS users should replace “home” with “Users”).

Using aliases to avoid excessive typing

Perhaps you don’t want to have to remember that long string, or type it out. In that case, open your .bashrc file in your home directory (assuming you use bash as your shell) and add a line like this:

alias ytdl='[path to __main__.py]'

Remember to make the correct substitution for [path to __main__.py], depending on which version you downloaded. After logging out and back in, you should be able to just use ytdl in place of ~/ytdl/youtube-dl/youtube_dl/__main__.py or ~/ytdl/youtube-dl-master/youtube_dl/__main__.py.

You can also make alaiases that invoke frequently-used options.  For example, if in some cases a file seems to be coming in normally and then all of a sudden you get a series of “Non-monotonous DTS in output stream” errors, you may find that you need to use the --hls-prefer-native option to get a good file. If you find you are doing this a lot, you could add an alias such as this:

alias ytdln='[path to __main__.py] --hls-prefer-native'

The above is all on one line, even if it shows as two or more lines in your display.  Then you would use ytdln to include that option. You can create one or more aliases that include just about any frequently used option(s) in this way.

Please keep in mind that any time you upgrade to a newer version of youtube-dl, you will need to follow this procedure again – you can’t just use youtube -U because that would probably get the binary version. And be careful; if you make any changes and then later on install a new version over the top of them, those changes will be lost. Finally, please note that if you are ever trying to download patches or even entire modules from GitHub, make sure you get the “Raw” versionGitHub "Raw" button(use the button at the top right of the code block) or you will get the html version, which is almost certainly not what you want.