Option one: Tor on Debian Stretch - stable, Debian Buster - testing, or Debian Sid - unstable

If you're using Debian, just run as root:

  apt install tor 

Debian provides the LTS version of Tor. Note that this might not always give you the latest stable Tor version, but you will receive important security fixes. To make sure that you're running the latest stable version of Tor, see option two below.

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

Option two: Tor on Ubuntu or Debian

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.

Raspbian is not Debian. Tor might run fine on the Raspberry Pi 2 / 3 but not the first generation Pi. These packages might be confusingly broken for Raspbian users, since Raspbian called their architecture armhf but Debian already has an armhf. See this post for details.

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.

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