Archives For November 30, 1999

This is a beginner’s guide shows how to install and setup Tor service and Tor Browser in Ubuntu 24.10, Ubuntu 24.04, Ubuntu 22.04, Ubuntu 20.04, and their based systems, .e.g, Linux Mint 22/21. It should also work in Debian 11/12, and old Ubuntu 18.04, Ubuntu 16.04.

Tor, The Onion Router, is a free and open-source service enables people to browser the internet anonymously. While Tor in Ubuntu main repositories is always old, here’s how to install the LATEST version and receive updates via its apt repository.

How to Install Tor via the Official Apt Repository:

Tor has an official apt repository that supports for all current Ubuntu and Debian releases.

1.) Open terminal either from start menu or by pressing Ctrl+Alt+T on keyboard. Then run command to enable the usage of https support for apt package manager:

sudo apt install apt-transport-https

Type user password (no asterisk feedback) for sudo prompt and hit Enter. NOTE: In recent Debian/Ubuntu, this command is no longer required since apt now support https out-of-the-box!

2.) Run command to add the Tor repository:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/tor-project.list

This command will create tor-project.list file under apt sources directory, and write the content under double quotation marks into it.

NOTE 1: For arm64 (e.g., Rasperry Pi), 32-bit Ubuntu 18.04/16.04, you have to remove arch=amd64 from the command.
NOTE 2: For Linux Mint and other Ubuntu based systems, replace $(lsb_release -sc) in the command with the Ubuntu code-name that your system based on, e.g.,

  • noble for Ubuntu 24.04, Linux Mint 22, etc.
  • jammy for Ubuntu 22.04, Linux Mint 21, etc.
  • focal for Ubuntu 20.04, Linux Mint 20, etc.
  • Run cat /etc/os-release to tell if you don’t know which Ubuntu version your system is based on.

3.) The keyring updates regularly and there’s no valid command to install it so far. As an alternative, download the latest keyring .deb package from the link below:

Then install it via double-click, gdebi, or by running command in terminal:

sudo apt install ./Downloads/deb.torproject.org-keyring*.deb

4.) Finally, refresh system package cache by running command:

sudo apt update

The output should include something looks like: “Get:x https://deb.torproject.org/torproject.org …

Then, install tor package via command:

sudo apt install tor

Or update it, if an old version was installed, via Software Updater

5.) Once installed, you can check Tor version and if it’s running via commands:

tor --version

systemctl status tor

NOTE: In case the service is not in active status, try systemctl daemon-reload then start with systemctl start tor.

How to Install Tor Browser in Ubuntu:

If everything goes OK, let’s now install the Tor web browser.

1.) Simply open terminal and run command:

sudo apt install torbrowser-launcher

UPDATE: Due to package bug in Ubuntu 22.04, it may refuse to launch. To workaround it, open ‘terminal’ and run command to edit the ‘__init__.py‘ (2 underscores before & after ‘init’) file:

sudo gedit /usr/lib/python3/dist-packages/torbrowser_launcher/__init__.py

When the file opens, change the line 98, 99, 100 and save it:

gui.move(
(desktop.width() – window_size.width()) // 2,
(desktop.height() – window_size.height()) // 2
)

2.) Then search for and open Tor Browser from system application launcher. It will automatically download & install the browser in your system.

For choice, you may open Tor Browser Launcher to select mirror, change listening port, and reinstall Tor browser.

3.) Once the download process finished, select ‘Configure’ if you’re in a Country censors Tor or behind proxy in next window, or select ‘Connect’:

When everything’s done, the Tor browser starts. That’s all. Enjoy!

Uninstall Tor and Tor Browser:

To remove Tor Browser, open terminal and run command:

sudo apt remove torbrowser-launcher

To remove Tor network service, run command:

sudo apt remove --autoremove tor

The ‘Software & Updates -> Other Software‘ seems no longer display software repositories added via “signed-by” argument. To remove the repository, use command to remove the source file:

sudo rm /etc/apt/sources.list.d/tor-project.list

Also, remove the keyring files via command:

sudo rm /usr/share/keyrings/deb.torproject.org-keyring.gpg

And, finally refresh system package cache via sudo apt update command.

Tor repository

This tutorial shows how to install Tor – a free software for enabling online anonymity – via its official repository in Ubuntu 13.10, Ubuntu 13.04, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 10.04

It’s not recommended to use the default Tor packages in Ubuntu’s universe repository because have not reliably been updated in the past, which means you could be missing stability and security fixes.

NOTE: What follows is going to show how to install Tor (standalone), you’ll need to manually configure your apps to use Tor.

If you just want to use Tor for anonymous web browsing, please use the Tor Browser Bundle. It comes with readily configured Tor and a browser patched for better anonymity.

To get started, press Ctrl+Alt+T on keyboard to open terminal. When it opens, follow below steps:

1. Paste command below and hit enter to add Tor repository:

sudo sh -c 'echo "deb http://deb.torproject.org/torproject.org $(lsb_release -sc) main" >> /etc/apt/sources.list.d/tor.list'

2. Download and install the key:

gpg --keyserver keys.gnupg.net --recv 886DDD89

gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

3. Now refresh your sources and install deb to keep the signing key current:

sudo apt-get update

sudo apt-get install deb.torproject.org-keyring

Finally, the latest stable Tor is available in Ubuntu Software Center.

See the Wiki page for more