55

I tried to install Tor on my new version of Ubuntu, but it seems that Tor is not available in the repositories.

How else can I install and use Tor?

2

11 Answers 11

26

If you want to anonymously browse the internet using the Tor network

If you want to anonymously do other things using the Tor network

As of 2014-02-13, The Tor Project's Ubuntu installation page says:

"You'll need to set up our package repository before you can fetch Tor. First, you need to figure out the name of your distribution. A quick command to run is lsb_release -c or cat /etc/debian_version. If in doubt about your Debian version, check the Debian website. For Ubuntu, ask Wikipedia. Then add this line to your /etc/apt/sources.list file:

deb http://deb.torproject.org/torproject.org <DISTRIBUTION> main

where you put the codename of your distribution (i.e. lenny, sid, saucy or whatever it is) in place of <DISTRIBUTION>.

Then add the gpg key used to sign the packages by running the following commands at your command prompt:

gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

Now refresh your sources, running the following command (as root) at your command prompt:

apt-get update

If there are no errors you're good to continue.

We provide a Debian package to help you keep our signing key current. It is recommended you use it. Install it using:

apt-get install deb.torproject.org-keyring

To finally install Tor just run:

apt-get install tor

Now Tor is installed and running. Move on to step two of the "Tor on Linux/Unix" instructions.

The DNS name deb.torproject.org is actually a set of independent servers in a DNS round robin configuration. If you for some reason cannot access it you might try to use the name of one of its part instead. Try deb-master.torproject.org, mirror.netcologne.de or tor.mirror.youam.de."

Step Two of "Tor on Linux/Unix" instructions:

"For information on how to Torify other applications, check out the Torify HOWTO."

4
  • 2
    I found out what the problem was , [Mr.jerad benge's help][1] was correct , I live in Iran and torproject site is blocked or filtered from Iran and that is why I could not download tor . I finally got it to work. [1]:askubuntu.com/a/6543/61218
    – ali
    Nov 1, 2010 at 18:18
  • @ali I'm glad that you managed to find a way to install tor. I assume you also need to use bridges to connect to the tor network, right? Could you please tell me how you managed to download tor? Jan 15, 2014 at 11:03
  • I can't open the tor-project site, because it's filtered in here!
    – Mirza
    Dec 21, 2018 at 7:07
  • Tor didn't release yet packages for Ubuntu 20.04 2019.www.torproject.org/docs/debian.html.en#ubuntu They say: Do not use the packages in Ubuntu's universe. In the past they have not reliably been updated. That means you could be missing stability and security fixes.
    – Sybil
    Aug 13, 2020 at 4:10
25
  • Surf the web anonymously

    If you just want to browse the web anonymously or access .onion domains (so-called hidden services), the recommended and simplest way is to use the Tor Browser Bundle:

    1. Download Tor Browser bundle
    2. Extract the downloaded archive
    3. click on the file "start-tor-browser".

    If you need maximum privacy and don't want to leave any trace of a Tor installation on your computer, download, burn and boot the Live CD system Tails.


  • Torify any application

    Only when you want to torify any other application (Instant messenger, Bitcoin client, etc.), you need to follow this procedure.

    You can add the repository, download and install Tor on Ubuntu by executing the following commands in a Terminal:

    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 886DDD89
    sudo add-apt-repository "deb http://deb.torproject.org/torproject.org $(lsb_release -s -c) main"
    sudo apt-get update && sudo apt-get -y install tor-geoipdb
    

    Now you can start Tor by pressing Alt+F2 and entering tor. Applications that support a proxy can now be set up to use address localhost, port 9050 as a SOCKS proxy.


  • Custom web browser and proxy setup

    If you still want to torify your existing browser with stand-alone Tor and surf anonymously, you can install polipo

    sudo apt-get install polipo
    sudo cp /etc/polipo/config /etc/polipo/config.bak
    sudo wget -O /etc/polipo/config https://gitweb.torproject.org/torbrowser.git/blob_plain/ae4aa49ad9100a50eec049d0a419fac63a84d874:/build-scripts/config/polipo.conf
    sudo service polipo restart
    

    Set the browser proxy settings to localhost and port 8123. Check if the settigns are correct by visiting https://check.torproject.org. Keep in mind that the Tor Browser Bundle is still the best option to surf the web anonymously because it uses a custom-built version of Firefox.

0
10

Add this line:

deb     http://deb.torproject.org/torproject.org <DISTRIBUTION> main

to the /etc/apt/sources.list file, using sudo nano /etc/apt/sources.list.

Also, I find it easier to just download the tor browser bundle and unpack it. You get manual updates, but it informs you when there's a new version.

0
6

On the installation instruction page of tor you will find what you need to do, here are the instructions.

Enter the folloing commands in a terminal of your choice. (ctrl + alt + T as standard)

This procedure is the same for every version, but you need to edit the source line with your release name. The currently supported releases are:

  • Ubuntu 13.04 is "raring"

  • Ubuntu 12.10 is "quantal"

  • Ubuntu 12.04 is "precise"

  • Ubuntu 11.10 is "oneiric"

  • Ubuntu 11.04 is "natty"

  • Ubuntu 10.04 is "lucid"

add the source. by editing the source list. add the line that starts with deb. change RELEASENAME to what release you are on.

sudo nano  /etc/apt/sources

deb     http://deb.torproject.org/torproject.org RELEASENAME main

add the keys

gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

update the system and install tor.

sudo apt-get update
sudo apt-get install deb.torproject.org-keyring
sudo apt-get install tor
1
  • 1
    As the install page says, these are instructions to install tor - not the tor browser bundle as the OP was asking. If you only install tor, you still have to configure your applications to use tor. Dec 8, 2013 at 9:03
5

You must add the ppa to the repositories.

For 32bit OS

sudo add-apt-repository ppa:upubuntu-com/tor

For 64 bit OS

sudo add-apt-repository ppa:upubuntu-com/tor64

And now you should update, to load a the updated repository list

sudo apt-get update

And now you can install your tor-browser

sudo apt-get install tor-browser
9
  • I did just what you wrote.Something is wrong with my PC.
    – user166408
    Jun 12, 2013 at 0:37
  • After I typed "sudo apt-get install tor-browser" , this massage alway comeup "E: Unable to locate package tor-browser
    – user166408
    Jun 12, 2013 at 0:39
  • Did you run sudo apt-get update? Because I just tested this, and it works.
    – Dr_Bunsen
    Jun 29, 2013 at 9:40
  • After installing, when I start tor browser Error pops up "tor unexpectedly exited" Help please Oct 4, 2014 at 2:26
  • I installed. But I cannot launch it. When I enter tor on terminal, I get: Wrong architecture? 32-bit vs. 64-bit.
    – shravan
    Oct 2, 2015 at 0:48
5

Tor Browser (torbrowser-launcher) is available in the default Ubuntu repositories in Ubuntu 16.04 and later. torbrowser-launcher handles downloading the most recent version of Tor Browser Bundle for you, in your language and for your architecture. After installing Tor Browser, it can be launched by searching for tor in the Dash and clicking the Tor Browser icon. The Tor Browser Launcher Settings app is also installed along with Tor Browser.

Tor


Unfortunately the Tor Browser developers change their signing key that is used to install Tor Browser at periodic intervals which makes the torbrowser-launcher package from the default Ubuntu repositories not work because it is not as up-to-date as the current version of Tor Browser.

These are the instructions from the official Tor Browser User Manual in case the Ubuntu torbrowser-launcher package hasn't updated the gpg key that is required to install Tor Browser. When I updated the Tor Browser Developers signing key I noticed that the key that I updated will expire in less than one year.

Install Tor Browser

  1. Navigate to the Tor Browser download page.

  2. Download the GNU/Linux .tar.xz file

  3. (Recommended) Verify the file's signature. The steps for verifying the file's signature are shown below.

  4. When the download is complete, extract the archive with the command tar -xf [TB archive] or with the Archive Manager.

  5. Navigate to the newly extracted Tor Browser directory. Right-click on start-tor-browser.desktop, open Properties and change the permission to Allow executing file as program by clicking the checkbox.

  6. Start Tor Browser from the command line by running:

     ./start-tor-browser
    

Set a keyboard shortcut to start Tor Browser

Remember the location where you downloaded the tor-browser-linux64-xx.x.xx_xx-xx.tar.xz archive. In this example I will call this location /home/your-username/Downloads/ which is the default location of the Downloads directory in Ubuntu if you replace your-username by your own user name.

Remember the directory where you extracted the Tor Browser files. In this example I will call this directory /home/your-username/Downloads/tor-browser_en-US/ where en is the abbreviation for the language and US is the abbreviation for the nation which could be different depending on your language and nation.

Go to Settings -> Keyboard -> View and Customize Shortcuts -> Set Custom Shortcut.

  • In the field after Name type Tor Browser.

  • In the field after Command type: sh -c '"/home/your-username/Downloads/tor-browser_en-US/Browser/start-tor-browser" --detach || ([ ! -x "/home/your-username/Downloads/tor-browser_en-US/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k

  • In order to fill in an entry in the field after Shortcut press any easy to remember keyboard shortcut combination (e.g. Ctrl + Alt +B).

enter image description here

Now you can start Tor Browser by pressing Ctrl + Alt +B.


How to verify Tor Browser's signature

Fetching the Tor Developers key

The Tor Browser team signs Tor Browser releases. Import the Tor Browser Developers signing key (0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290):

gpg --auto-key-locate nodefault,wkd --locate-keys [email protected]

This should show you something like:

gpg: key 4E2C6E8793298290: public key "Tor Browser Developers (signing key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
pub   rsa4096 2014-12-15 [C] [expires: 2020-08-24]
      EF6E286DDA85EA2A4BA7DE684E2C6E8793298290
uid           [ unknown] Tor Browser Developers (signing key) <[email protected]>
sub   rsa4096 2018-05-26 [S] [expires: 2020-09-12]

After importing the key, you can save it to a file (identifying it by fingerprint here):

gpg --output ./tor.keyring --export 0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290

Verifying the signature

To verify the signature of the package you downloaded, you will need to download the corresponding ".asc" signature file as well as the installer file itself, and verify it with a command that asks GnuPG to verify the file that you downloaded.

The example below assumes that you downloaded these two files to your Downloads folder.

gpgv --keyring ./tor.keyring ~/Downloads/tor-browser-linux64-9.0_en-US.tar.xz{.asc,}

The result of the command should produce something like this:

gpgv: Signature made 07/08/19 04:03:49 Pacific Daylight Time
gpgv:                using RSA key EB774491D9FF06E2
gpgv: Good signature from "Tor Browser Developers (signing key) <[email protected]>"
4

https://www.torproject.org/docs/tor-doc-unix.html.en

Step One: Download and Install Tor

The latest release of Tor can be found on the download page. We have packages for Debian, Red Hat, Gentoo, *BSD, etc there too. If you're using Ubuntu, don't use the default packages: use our deb repository instead. Similarly, CentOS / Fedora / OpenSUSE users should use our rpm repository instead.

If you're building from source, first install libevent, and make sure you have openssl and zlib (including the -devel packages if applicable). Then run:

tar xzf tor-0.2.3.25.tar.gz; cd tor-0.2.3.25 ./configure && make

Now you can run tor as src/or/tor, or you can run make install (as root if necessary) to install it into /usr/local/, and then you can start it just by running tor.

Tor comes configured as a client by default. It uses a built-in default configuration file, and most people won't need to change any of the settings. Tor is now installed.


Please pay attention to the warning in bold

The advised method of installing:

add this line to your /etc/apt/sources.list file:

 deb     http://deb.torproject.org/torproject.org <DISTRIBUTION> main

where you put the codename of your distribution (i.e. lenny, sid, maverick or whatever it is) in place of . Then add the gpg key used to sign the packages by running the following commands at your command prompt:

gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

Now refresh your sources, running the following command at your command prompt:

sudo apt-get update

If there are no errors you're good to continue. We provide a Debian package to help you keep our signing key current. It is recommended you use it. Install it using

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

To finally install Tor just run:

sudo apt-get install tor

Now Tor is installed and running. Move on to step two of the "Tor on Linux/Unix" instructions.

3

Run Tor Bundle 'Portable'

You can run tor without installing it (yeah, someone could consider this off topic here).

  1. Download the latest version of tor from the website and open the signature of the file

    download_tor_and_click_on_sig

  2. Now you will see the PGP signature, save it on the same place than the Tor bundle

    right-click_and_Save-page-as

  3. Then open a terminal (Ctrl+Alt+T), go to the folder where Tor has been saved and check its integrity with this command: gpg --verify filname.tar.xz.asc

If you get a message that says "Good signature" means that your Tor is a good copy.

Now extract it, open the folder, click on start-tor-browser and run!

extract_open_click_run

0
2

Install from Terminal:

Note: If you installed older version of Tor-Browser, in first you must clear the old .tor-browser-en folder from home folder. You can clear it by using following command:

cd ~ && rm -r .tor-browser-en

Then use following commands to install tor from Terminal:

sudo add-apt-repository ppa:webupd8team/tor-browser
sudo apt-get update
sudo apt-get install tor-browser

Now open dash and type "Tor", click on and use.

1

Source

Tor browser Ubuntu PPA

  • 32-bit

sudo add-apt-repository ppa:upubuntu-com/tor

sudo apt-get update

sudo apt-get install tor-browser

  • 64-bit

sudo add-apt-repository ppa:upubuntu-com/tor64

sudo apt-get update

sudo apt-get install tor-browser

Always needed the command:

sudo chown $USER -R ~/.tor-browser/

Run from dash or terminal

tor-browser
3
  • the following intruction didn't work sudo chown $USER -R ~/.tor-browser/ because the directory don't exist. This is the output message: chown: cannot access '/home/zignd/.tor-browser/': No such file or directory
    – Zignd
    Nov 27, 2012 at 11:07
  • @Zignd you probably need to start tor at least once for the directory to exist. Nov 27, 2012 at 22:05
  • @BrunoPereira It still didn't worked, I've also install tor, polipo and tor-geoipdb. I think this answer simply don't work.
    – Zignd
    Nov 28, 2012 at 10:46
0

For installing only the "tor-browser" all the above answers add unnecessary complexity. Easiest solution in Ubuntu 20.04 or greater -

Open terminal and type -

sudo apt install torbrowser-launcher

Then go to "Show Applications" in Ubuntu system. Type "Tor" - two applications will pop-up - "Tor Browser" and "Tor Browser Launcher". Click on "Tor Browser".

Now the "Tor Browser" along with "PGP signature" will get automatically downloaded and signature will get added to keyring.

Now that "Tor Browser" is installed launch it from "Applications", click on the "Connect to Tor Bridge" button that shows up on welcome screen and start browsing.

Super easy installation without any complexity which even a newbie without any knowledge of Linux can easily follow.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .