Admin access: To install Tor you need root privileges.
Below all commands that need to be run as root user like apt and dpkg are prepended with '#', while commands to be run as user with '$' resembling the standard prompt in a terminal.
To open a root terminal you have several options: sudo su, or sudo -i, or su -i. Note that sudo asks for your user password, while su expects the root password of your system.
- Install a package manager
There are two package manager on OS X: Homebrew and Macports.
You can use the package manager of your choice.
To install Homebrew follow the instructions on brew.sh.
To install Macports follow the instructions on macports.org/install.php.
- Package installation
If you are using Homebrew in a Terminal window, run:
# brew install tor
If you are using Macports in a Terminal window, run:
$ sudo port install tor
Debian / Ubuntu
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.
- Configure Tor package repository
Enable the Torproject package repository by following the instructions.
# apt install tor
- Configure Tor Package repository
Add the following to /etc/yum.repos.d/tor.repo and then install the tor package.
name=Tor for Fedora $releasever - $basearch
# dnf install tor
# pkg install tor
# pkg_add tor
Installing Tor from source
- Download latest release and dependencies
The latest release of Tor can be found on the download page.
If you're building from source, first install libevent, and make sure you have openssl and zlib (including the -devel packages if applicable).
tar xzf tor-0.4.3.6.tar.gz; cd tor-0.4.3.6
./configure && make
Now you can run tor as src/app/tor (0.4.3.x and later), 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.