How to install and use Tor Client on Linux (Ubuntu)

Tor is free and open software responsible for enabling anonymous communication, through routing all the traffic over secure overlay (encryption) network in the application layer. It can be used on Windows, macOS and Linux. However, this article only focuses on Linux distros (Distributions).

Tor stands for, The Onion Router, it was developed by United States Naval Research Laboratory employees in mid 1990s to protect U.S. intelligence communications online. The first public release of Tor Client was only launched in 2003, only in 2004 it was released under free license.

How to install Tor Client on Ubuntu?

How to use Tor Client?

As everyone knows, Ubuntu is a Linux Distro based on Debian. This article is also applicable to all Ubuntu Based Distros like Linux Mint, Pop!_ OS, Zorin OS, Elementary OS and many more. It’s likely that it will also work on Debian and it Derivatives. This article explains how to install the latest Tor Client in Ubuntu 20.04 LTS and 21.10. I assume that most of popular browser applications now support SOCKS5 proxies, so there’s no need for workarounds.

Installing Tor Client in Ubuntu

There are two options when we consider installing a general package on Debian Based Distro. We could simply install the packages from the distro repositories (ATTENTION: The package may seem old, but was tested for quite time to ensure stability before Feature Freeze stage), or we could download the package from it’s official repository (Less Stable). I recommend the former approach.

Installing Tor Client from Distro Repository

I. Download and Install Tor Client from Ubuntu Repo

Open your Terminal by pressing the combined keys Ctrl + Alt + T and run the command below:

sudo apt install tor

II. Confirm if Tor Client is up and Running

ss -nlt or systemctl status tor

Otherwise, you may want to to start it up with this command below:

sudo systemctl start tor

If you want to enable Tor Client to automatically run every time the system start (on startup), run this command:

sudo systemctl enable tor

Adding Tor Client Official Repo (Optional)

I. Download and install Curl

Curl is simple software to transfer data. If you don’t have it already installed on your distro then,

sudo apt install curl

II. Add Tor Official Repo and Key with following commands

sudo -i or sudo su (Your choice)

echo "deb $(lsb_release -cs) main" > /etc/apt/sources.list.d/tor.list

curl | gpg --import

gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -

apt update


III. Ensure that you will always be use the latest repository signing key

sudo apt install

IV. Install the latest Tor Client version

sudo apt install tor

After the above command congratulations you have the latest version of Tor Client and it’s dependencies running on your PC!

How to use Tor Client?

On Ubuntu you can you use Tor Client in two levels: System-wide and Application Level. On System-wide all applications and services will be forced to route all traffic through Tor Client Proxy. The latter only a specific application or service will route all its traffic through Tor Client Proxy.

I. Use Tor Client as System-wide Proxy

For that, in your DE (Desktop Environment), for example Gnome go to System Settings -> Network, click on Network Proxy, set the proxy to Manual, then use localhost or as the Socks Host and 9050 as the port.

How to install and use Tor Client on Linux (Ubuntu)
Ubuntu System-wide Proxy setup

II. Use Tor Client as Application or Service Level Proxy

Go to your Firefox Network Settings and choose manual Proxy to set the proxy IP: port to so your application can communicate with Tor Network.

How to install and use Tor Client on Linux (Ubuntu)
Ubuntu Application-level Proxy setup

Leave a Reply

This site uses User Verification plugin to reduce spam. See how your comment data is processed.