Tor is free software and an open network. Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location. You can read more at TorProject.
How To Install Tor Browser In Kali Linux Using Apt
- Open a terminal window
- Run
apt-get update
- Run
apt-get install tor torbrowser-launcher
and select Y at the prompt
Now you’ll have a new Tor Browser application in the Applications menu under Usual Applications and Internet. This shortcut will only work if you’re not running as the root user. See the instructions below if you’re running Kali as root.
How To Install Tor Browser In Kali Linux Manually
- Download the Tor Bundle from here: Tor Bundle Download
- Download a package called torbrowser-launcher which can be found here: GitHub – TorBrowser-Launcher
- Download the architecture-appropriate file above, save it somewhere, then run the tar command to extract the package from the download directory:
tar -xvf tor*
This command assumes this is the only file in the directory that starts with “tor”. - To run the Tor Browser Bundle, execute the start-tor-browser script from the directory you just extracted:
./start-tor-browser.desktop
This will launch Vidalia and once that connects to Tor, it will launch Firefox.
How To Run Tor While Logged In As Root
If you’re running Kali Linux as root, you might get an error saying you can’t run Tor as root. Some website will tell you to edit the launcher script, but that is not the recommended method. Instead, follow the instructions below to add a new non-root user.
You can create a new user and configure Tor to run as that user even though you’re logged in as root. To do so, run these commands from Terminal:
adduser --home /home/toruser toruser
(or whatever username you want to use)
You’ll be prompted to create a password, but you don’t really need to save it unless you want to actually login as this user. Fill in the other prompts as needed.- You’ll need to run
xhost si:localuser:toruser
from Terminal to get the new user listed in xhost. - To run Tor as the new user, use this command from Terminal:
sudo -u toruser -H torbrowser-launcher
You can also edit the Applications menu shortcut, but it’ll require another app to get installed:
- Run
apt-get install alacarte
from Terminal - Run
alacarte
from Terminal after the app is installed - Browse through your Applications menu under Usual Applications > Internet and find Tor Browser and click Properties
- Edit the command box and change it to
sudo -u toruser -H torbrowser-launcher %u
- Click OK and Close
If you’re running the latest version of Kali that uses XFCE as the default desktop environment then you can’t use alacarte to edit the application menu. Instead, navigate to the Usual Applications folder and Internet. Then right-click on Tor Browser and edit the command entry to be sudo -u toruser -H torbrowser-launcher %u
.
Video Tutorial
How To Uninstall Tor Browser In Kali Linux Using Apt
If you used the Apt method above to install Tor and later wish to uninstall Tor, you can use the below command to remove and purge all of the packages and files that were installed.
- Open a terminal window
- Run
apt-get remove --purge tor torbrowser-launcher
and select Y at the prompt
How To Remove Tor User Account
If you used the above methods to create a regular user account to run Tor while logged in as root, you can use these steps to remove that account and delete the home directory that was created.
- Open a terminal window
- Run
userdel -r toruser
(or whatever username you want to use)
thank you it is very help me!!
not very beginner friendly. wish more tutorials would explain more in detail. totally lost in many steps
Which steps did you get stuck at? Kali isn’t an operating system for beginners but I’m sure I could help you get it installed.
I’ve made some significant changes to the article. I hope you find them helpful and more straightforward.
I followed your instructions to the letter, everything went as your’s did, no issues at all yet after the alacarte config, Tor will not start at all. I’m using Kali 2018.3 on hardware.
Could you paste what you have in the command box from the alacarte screen?
i failed to launch the desktop extension.
thank you its very useful info
Hey this is great!
Although, how can i ensure that i am using tor as “toruser” and not root…. is there any way i can check?
As long as you’re using the commands above to launch Tor you’ll be using the toruser account. You might be able to check using the top command and see which user the process is running under.
Hi…
Got a problem, not starting after the alacarte edit. This is what I put in the alacarte command box, “sudo -u torboxuser -H torbrowser-launcher %u.”
whats going on with this do you think?
Try
sudo -u torbrowseruser -H torbrowser-launcher %u
No period after the command. And the username after the -u should be the one you made in a previous command.
Please Explain How can i uninstall it completely, i installed it using your apt defined method. and performed those adding new user commands, Now i just want to remove it completely along with the user created, provide a guide please ! (username is same as in your commands ‘toruser’)
I’ve edited the article to include instructions to uninstall tor and tor-launcher as well as removing the user account that was created and the home directory for the toruser account.
I have a problem .. when I tried to start torbrowser-launcher by using command
sudo -u toruser -H torbrowser-launcher
I get this
Tor Browser Launcher
By Micah Lee, licensed under MIT
version 0.3.1
https://github.com/micahflee/torbrowser-launcher
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0
Could not connect to any X display.
what to do?
And I manage to get to the point where it says this:
Launching ‘./Browser/start-tor-browser –detach’…
But then when I check the processes running, there is none (except for the top process itself)
The way I got there was, first I had to adduser –system –home
then later locate the file where torbrowser was starting from and putting that file with the toruser /home/toruser/.local/share/torbrowser/tbb/i686/tor-browser_en-US
Then from there I could sudo -u toruser -H ./start-tor-browser.desktop
Launching ‘./Browser/start-tor-browser –detach’…
Now, as I said nothing happens.. I also tried installing alacarte and putting in a shortcut to the other user there.
Earlier I also skipped the step where I move the file, but the result was exactly the same as now (just tried something different to see if it worked)
I’m a big noob :D please help!
I’m getting black screen when I open tor. Can anyone help me?
In the last step ..
“Edit the command box and change it to sudo -u toruser -H torbrowser-launcher %u”
Change the command to ….
“xhost si:localuser:toruser && sudo -u toruser -H torbrowser-launcher %u”
xhost si:localuser:toruser && sudo -u toruser -H torbrowser-launcher %u
Tried that didn’t work either.
kali 5.2.0-kali2-686-pae
Launched from terminal it gets down to “Bootstrapped 100%” then hangs indefinately
when i run sudo -u toruser -h torbrowser-launcher i get a bash error (-u : command not found)
Hi team, just wanted to thank you for the shortcut method.. I spent 20+ hours trying to get Tor running on a kali-lite live USB desktop without persistence because I’m so new to linux I can’t figure out how to to get some persistance.
Anyway I wanted to let people know that despite me running kali as root user I was easily able to intall Tor via your shortcut method. Fast!
My setup: Linux kali 4.19.0-kali3-amd64 #1 SMP Debian 4.19.20-1kali1 (2019-02-14) x86_64 GNU/Linux
Thanks a lot that worked for me after searching for 2h :) keep it up 👆
I am getting an error that the tor doesn’t have any installation candidate
I am getting this response:
Verifying Signature
Refreshing local keyring…
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py”, line 589, in verify
c.verify(signature=sig, signed_data=signed)
File “/usr/lib/python3/dist-packages/gpg/core.py”, line 541, in verify
raise errors.BadSignatures(results[1], results=results)
gpg.errors.BadSignatures: 110775B5D101FB36BC6C911BEB774491D9FF06E2: Key expired
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py”, line 600, in run
verify()
File “/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py”, line 594, in verify
raise Exception
Exception
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py”, line 603, in run
self.common.refresh_keyring()
File “/usr/lib/python3/dist-packages/torbrowser_launcher/common.py”, line 206, in refresh_keyring
p = subprocess.Popen([‘/usr/bin/gpg2’, ‘–status-fd’, ‘2’,
File “/usr/lib/python3.8/subprocess.py”, line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib/python3.8/subprocess.py”, line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/bin/gpg2’
Aborted
when i enter “sudo -u … torbrowsser-launcher” come a box about downloading torbrowser for the first time but it cancel and ask “are you connected to the internet?! :/// my internet connection is ok but why?