Learn how to install Tor on Linux in this article by Sion Retzkin, director of customer success at Pcysys and an IT and security professional with over 20 years’ experience in various technical and business roles.
What is Tor?
Tor (which is an acronym for The Onion Router) is a privacy focused network that hides your traffic, by routing it through multiple random servers on the Tor network.
So, instead of the packets that make up your communication with another party (person or organization), going from point A to B directly, using Tor, they will jump all over the place, between multiple servers, before reaching point B, hiding the trail. Additionally, the packets that make up the traffic (or communication) in the Tor network are wrapped in special layers, which only show the previous server or step that the packet came from, and the next step, hiding the entire route effectively.
One of the ways to connect to the Dark Web is using the Tor Browser. Tor Browser is a web browser, based on Firefox that was created for the purpose of accessing the Tor network, securely and privately. It allows a user to connect to the Tor network, one of the major Dark nets out there. Even without connecting to the Tor network, the Tor Browser provides anonymity and privacy while surfing Surface Web websites.
Even if you use Tor, this doesn’t mean that you’re secure. Why is that? It is so because Tor Browser has software vulnerabilities, same as every other browser. It’s also based on Firefox, so it inherits some of its vulnerabilities from there as well.
You can minimize attack vectors by applying common security sense and by employing various tools to try to limit or prevent malicious activity, related to infecting Tor Browser or the host running it.
OK, let’s move on to the juicy part: installing Tor on Linux.
Installing Tor on Linux
Installing software on Linux is usually very easy. There are several ways to install Tor Browser. Let’s start with a classic installation, by accessing the Tor Project website, via a browser. The default browser that ships with Ubuntu is Firefox, which is what we’ll use. Although you might think that this would be the best way to install Tor Browser, it’s actually the least secure, since the Tor Project website is continuously targeted by hackers and might have any number of security or privacy issues on it.
Instead of just downloading Tor Browser and immediately installing it (which is dangerous), you can either download the file and verify its hash (to verify that it is indeed the correct one) or you could install it through other methods, for example, via the Terminal, using Linux commands or from the Ubuntu Software Center.
We’ll start by going over the steps to download Tor Browser from the Tor Project website:
- After booting your Linux installation, open your browser.
- Enter the following address and navigate to it: https://www.torproject.org/download/download-easy.html.en#linux.
Notice that the URL takes you directly to the Linux download section of the Tor Project website. This direct method is usually preferred rather than starting with Google (or any other search engine), searching for Tor, and then accessing the Tor Project website. Google collects information about users accessing it, and the whole idea of this exercise is to maintain your privacy and security. Also, always verify that you’re accessing the Tor Project website via HTTPS.
- Choose the correct architecture (32 or 64 bit), and click on the Download link.
- You’ll be able to choose what you want to do with the file—open it with Ubuntu’s Archive Manager or save it to a location on the disk:
Downloading Tor Browser
Again, the quickest way to go would be to open the compressed file, but the more secure way would be to download the file and to verify its hash, before doing anything else.
The Tor Project provides GNU Privacy Guard (GPG) signature files, with each version of Tor Browser. You will need to install GnuPG on your Linux OS, if it isn’t there already, in order to be able to verify the hash of the browser package.
To do so, just open the Terminal and type in the following:[shell]sudo apt install gnupg[/shell]
Enter your password when required, and the installation will commence. Most Linux installations already include gnupg, as can be seen in the following screenshot:
After installing GnuPG, you need to import the key that signed the package. According to the Tor Project website, the Tor Browser import key is 0x4e2C6e8793298290.
The Tor Project updates and changes the keys from time to time, so you can always navigate to https://www.torproject.org/docs/verifying-signatures.html.en to find the current import key, if the one here doesn’t work.
The command to import the key is as follows:[shell]gpg –keyserver pool.sks-keyservers.net –recv-keys 0x4e2C6e8793298290[/shell]
This is followed by:[shell]gpg –fingerprint 0x4e2C6e8793298290[/shell]
This will tell you whether the key fingerprint is correct. You should see the following:
Verify key fingerprint
Now, you need to download the .asc file, which is found on the Tor Browser Downloads page, next to the relevant package of the browser (it appears as sig, short for signature):
ASC file location
You can find the Tor Browser download page at https://www.torproject.org/projects/torbrowser.html
Now, you can verify the signature of the package, using the ASC file.
To do so, enter the following command in the Terminal:[shell]gpg&lt;strong&gt; –verify tor-browser-linux64-7.5.6_en-US.tar.xz.asc tor-browser-linux64-7.5.6_en-US.tar.xz[/shell]
Note the 64 marked in bold. If your OS is 32-bit, change the number to 32. The result you should get is as follows:
Verifying the signature
After verifying the hash (signature) of the Tor Browser package, you can install it.
You can do so by either:
- Double-clicking the Tor Browser package file (which will open up the Archive Manager program), clicking Extract, and choosing the location of your choice.
- Right-click on the file and choose Extract here or Extract to and choose a location.
After extracting, perform the following steps:
- Navigate to the location you defined.
- Double-click on the Start-tor-browser.desktop file to launch Tor Browser.
- Press Trust and Launch in the window that appears:
Notice that the filename and icon changed to Tor Browser.
- Press Connect and you will be connected to the Tor network and will be able to browse it, using Tor Browser:
Connecting to Tor
Before we discuss using Tor Browser, let’s talk about alternative ways to install it, for example, by using the Ubuntu Software application.
- Start by clicking on the Ubuntu Software icon:
- Search for Tor Browser, then click on the relevant result:
Tor Browser in Ubuntu Software
- Then, click Install.
- After entering your password, the installation process will start. When it ends, click on Launch to start Tor Browser.
Installing Tor Browser via the Terminal, from the downloaded package
Another way to install Tor is to use commands, via the Terminal. There are several ways to do so:
- First, download the required Tor Browser package from the website.
- Verify the download and then keep the Terminal open.
- Navigate to the location where you downloaded Tor, by entering the following command:
For example, note the following:[shell]cd /downloads/tor-browser_en_US[/shell]
- Then, launch Tor Browser by running the following:
Installing the Tor Browser entirely via the Terminal
Next, discuss how to install Tor entirely via the Terminal:
- First, launch the Terminal, as before.
- Then, execute the following command:
sudo apt install torbrowser-launcher
This command will install Tor Browser.
- You can then run Tor by executing the following command:
If you found this article interesting, you can explore Hands-On Dark Web Analysis for understanding the concept Dark Web and Dark Net to utilize it for effective cybersecurity. Hands-On Dark Web Analysis will help you have hands-on experience working with the Deep Web and the Dark Web for security analysis.