Advertisement

Main Ad

How to install Tor in Kali Linux 2020 and fix "run Tor as root" error

In order to install Tor Browser on your Kali Linux, open your terminal and type:

 apt update

Once this is complete, run*:

apt-get install tor torbrowser-launcher

Now, try and open Tor, either form the terminal of from your Applications menu:

torbrowser-launcher

In case you'll get the same error I got, “The Tor Browser Bundle should not be run as root. Exiting”, you'll need to follow the bellow step:

error-running tor as root in kali linux 2020


You will need to edit the "start-tor-browser" file. In my case, this one is located in:

.local > share > torbrowser > tbb > x86_64 > tor-browser_en-US > Browser

Right click this file and edit the following code, from:

if [ "`id -u`" -eq 0 ]; then

complain "The Tor Browser Bundle should not be run as root.  Exiting."

exit 1

fi

into

#if [ "`id -u`" -eq 0 ]; then

#complain "The Tor Browser Bundle should not be run as root.  Exiting."

#exit 1

#fi

Basically, you'll just add the sharp (hashtag) # symbol in front of those 4 lines. Click save and exit the text editor. Boom, your "Click Connect to connect to Tor" window should be up and running.

Click Connect to connect to Tor

I had to make this tutorial because the other so-called fixes I've found were either outdated or sh1t. This worked for me in the latest kali linux 2020 version. Enjoy and feel free to share.

*depending if you already run Tor a root or not. In case you're not running commands as root, add sudo in front of your commands (eg: sudo apt-get install tor torbrowser-launcher).

tor started main window in kali linux 2020