How To Install tor on Ubuntu 18.04
Introduction
In this tutorial we learn how to install tor
on Ubuntu 18.04.
What is tor
tor is:
Tor is a connection-based low-latency anonymous communication system.
Clients choose a source-routed path through a set of relays, and negotiate a “virtual circuit” through the network, in which each relay knows its predecessor and successor, but no others. Traffic flowing down the circuit is decrypted at each relay, which reveals the downstream relay.
Basically, Tor provides a distributed network of relays. Users bounce their TCP streams (web traffic, ftp, ssh, etc) around the relays, and recipients, observers, and even the relays themselves have difficulty learning which users connected to which destinations.
This package enables only a Tor client by default, but it can also be configured as a relay and/or a hidden service easily.
Client applications can use the Tor network by connecting to the local socks proxy interface provided by your Tor instance. If the application itself does not come with socks support, you can use a socks client such as torsocks.
Note that Tor does no protocol cleaning on application traffic. There is a danger that application protocols and associated programs can be induced to reveal information about the user. Tor depends on Torbutton and similar protocol cleaners to solve this problem. For best protection when web surfing, the Tor Project recommends that you use the Tor Browser Bundle, a standalone tarball that includes static builds of Tor, Torbutton, and a modified Firefox that is patched to fix a variety of privacy bugs.
There are three methods to install tor
on Ubuntu 18.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install tor Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install tor
using apt-get
by running the following command:
sudo apt-get -y install tor
Install tor Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install tor
using apt
by running the following command:
sudo apt -y install tor
Install tor Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install tor
using aptitude
by running the following command:
sudo aptitude -y install tor
How To Uninstall tor on Ubuntu 18.04
To uninstall only the tor
package we can use the following command:
sudo apt-get remove tor
Uninstall tor And Its Dependencies
To uninstall tor
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove tor
Remove tor Configurations and Data
To remove tor
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge tor
Remove tor configuration, data, and all of its dependencies
We can use the following command to remove tor
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge tor
References
Summary
In this tutorial we learn how to install tor
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.