Step One: Update your system
Before installing Tor, it is best to ensure that your system is updated with the latest software packages and updates. Open your terminal and type the following command:
$ sudo apt update
$ sudo apt upgrade
Step Two: Install Tor on Linux
There are different ways to install Tor on Linux, but for this guide, we will use the apt package manager. To install Tor on Linux, follow these steps:
1. Open your terminal and type the following command:
$ sudo apt install tor
2. Once the installation is complete, ensure that Tor is running by typing the following command:
$ sudo systemctl status tor
The output of the command should show that Tor is running.
Step Three: Configure Tor on Linux
After successful installation, you can now configure Tor to run on your Linux system. To configure, follow these steps:
1. Open the torrc configuration file using your preferred text editor. In this guide, we will use nano.
$ sudo nano /etc/tor/torrc
2. Once the torrc configuration file opens, find the following line:
#ControlPort 9051 # If you enable the ControlPort, be sure to enable one
3. Uncomment the line by removing the # symbol and change the port number to 9050.
ControlPort 9050
4. Next, find the following two lines:
#CookieAuthentication 1
#CookieAuthFileGroupReadable 1
5. Uncomment the lines by removing the # symbol to enable cookie authentication.
CookieAuthentication 1
CookieAuthFileGroupReadable 1
6. Save and exit the file by pressing Ctrl+X, then Y, and then Enter.
Step Four: Restart Tor on Linux
After configuring Tor to run on your Linux system, you need to restart Tor for the changes to take effect. To restart Tor, follow these steps:
1. Type the following command to stop the Tor service:
$ sudo systemctl stop tor
2. Type the following command to start the Tor service:
$ sudo systemctl start tor
3. Check the status of the Tor service using the following command:
$ sudo systemctl status tor
The output of the command should show that the Tor service is active and running.
Step Five: Test Tor on Linux
After successful installation, configuration, and restart of Tor on Linux, you can now test if Tor is working correctly. To test Tor on Linux, follow these steps:
1. Open your preferred web browser and go to the Tor Project website. The URL is https://www.torproject.org.
2. If the website loads correctly, it means that Tor is working correctly on your Linux system.
Conclusion
In conclusion, installing Tor on Linux is a straightforward process if you follow the steps highlighted in this guide. By installing Tor on your Linux system, you can enhance your online privacy and anonymity when browsing the web. It is essential to ensure that you configure Tor correctly and restart the service for the changes to take effect. Finally, testing Tor on your Linux system will give you the assurance that it is running correctly.