How to install Tor
These instructions are meant for installing tor the network daemon i.e. little-t tor. For instructions to install Tor Browser, refer to the Tor Browser user manual.
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.
The Tor Project maintains its own Debian package repository. Since Debian provides the LTS version of Tor, this might not always give you the latest stable Tor version. Therefore, it's recommended to install tor from our repository.
Here's how you can enable Tor Package Repository in Debian based distributions:
Prerequisite: Verify the CPU architecture
The package repository offers amd64, arm64, and i386 binaries. Verify your operating system is capable of running the binary by inspecting the output of the following command:
$ sudo dpkg --print-architecture
It should output either amd64, arm64, or i386. The repository does not support other CPU architectures.
Note: The package repository does not offer 32-bit ARM architecture (armhf) images (yet). You should either install the version Debian offers (make sure to check out Debian backports, too, as that one has often a more up-to-date Tor package), or build Tor from source.
1. Telepítse a következőt: apt-transport-https
To enable all package managers using the libapt-pkg library to access metadata and packages available in sources accessible over https (Hypertext Transfer Protocol Secure).
$ sudo apt install apt-transport-https
2. Create a new file in /etc/apt/sources.list.d/ named tor.list. Add the following entries:
deb [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org <DISTRIBUTION> main
deb-src [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org <DISTRIBUTION> main
If you want to try experimental packages, add these in addition to the lines from above:
deb [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-experimental-<DISTRIBUTION> main
deb-src [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-experimental-<DISTRIBUTION> main
Or nightly builds:
deb [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-nightly-main-<DISTRIBUTION> main
deb-src [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-nightly-main-<DISTRIBUTION> main
Replace <DISTRIBUTION> with your Operating System codename. Run lsb_release -c or cat /etc/debian_version to check the Operating System version.
Note: Ubuntu Focal dropped support for 32-bit, so instead use:
deb [arch=<ARCHITECTURE> signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org focal main
deb-src [arch=<ARCHITECTURE> signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org focal main
Replace <ARCHITECTURE> with your system architecture (you found it earlier by writing dpkg --print-architecture).
Warning symptom when running sudo apt update:
Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://deb.torproject.org/torproject.org focal InRelease' doesn't support architecture 'i386'
3. Install GnuPG if not already installed:
$ sudo apt install gnupg
4. Then add the gpg key used to sign the packages by running the following command at your command prompt:
$ wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --dearmor | sudo tee /usr/share/keyrings/deb.torproject.org-keyring.gpg >/dev/null
5. Install tor and tor debian keyring
We provide a Debian package to help you keep our signing key current. It is recommended you use it. Install it with the following commands:
$ sudo apt update
$ sudo apt install tor deb.torproject.org-keyring
The Tor Project maintains its own RPM package repository for CentOS and RHEL and Fedora.
A következő módon tudja bekapcsolni a Tor Telepítési Forrásokat CentOS-en, RHEL-en és Fedora-n:
1. Engedélyezze az epel repository-t (csak CentOS és RHEL esetében)
$ sudo dnf install epel-release -y
2. Adja hozzá a következőhöz /etc/yum.repos.d/tor.repo
CentOS vagy RHEL esetén:
[tor] name=Tor for Enterprise Linux $releasever - $basearch baseurl=https://rpm.torproject.org/centos/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://rpm.torproject.org/centos/public_gpg.key cost=100
Fedora esetén:
[tor] name=Tor for Fedora $releasever - $basearch baseurl=https://rpm.torproject.org/fedora/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://rpm.torproject.org/fedora/public_gpg.key cost=100
3. Tor csomag telepítése
Ezután már tudod telepíteni a legfrissebb Tor csomagot.
$ sudo dnf install tor -y
Az első használatkor be kell importálni a GPG publikus kulcsot.
Importing GPG key 0x3621CD35: Userid : "Kushal Das (RPM Signing key) kushal@torproject.org" Fingerprint: 999E C8E3 14BC 8D46 022D 6C7D E217 C30C 3621 CD35 From : https://rpm.torproject.org/fedora/public_gpg.key Is this ok [y/N]: y
Install a package manager
There are two package managers 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.
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
To install the tor package on Void Linux, please run:
# xbps-install -S tor
To install the tor package on Arch Linux, run:
# pacman -Syu tor
To install the tor package on FreeBSD, run:
# pkg install tor
To install the tor package on OpenBSD, run:
# pkg_add tor
Setup pkg_add
Modern versions of the NetBSD operating system can be set to use pkgin, which is a piece of software aimed to be like apt or yum for managing pkgsrc binary packages. We are not convering its setup here, and opt to use plain pkg_add instead.
# echo "PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All" > /etc/pkg_install.conf
Package installation
Install tor NetBSD's package:
# pkg_add tor
Bootstrap pkg
DragonFlyBSD's daily snapshots and releases (starting with 3.4) come with pkg already installed. Upgrades from earlier releases, however, will not have it. If pkg is missing on the system for any reason, it can be quickly bootstrapped without having to build it from source or even having DPorts installed:
# cd /usr
# make pkg-bootstrap
# rehash
# pkg-static install -y pkg
# rehash
Recommended steps to setup pkg
Here, it will be similar to what we have on a FreeBSD system, and we are going to use HTTPS to fetch our packages, and updates - so here we also need an extra package to help us out (ca_root_nss).
Installing the ca_root_nss package:
# pkg install ca_root_nss
For fresh installations, the file /usr/local/etc/pkg/repos/df-latest.conf.sample is copied to /usr/local/etc/pkg/repos/df-latest. The files ending in the ".sample" extension are ignored; pkg(8) only reads files that end in ".conf" and it will read as many as it finds.
DragonflyBSD has 2 packages repositories:
- Avalon (mirror-master.dragonflybsd.org);
- Wolfpond (pkg.wolfpond.org).
We can simply edit the URL used to point out the repositories on /usr/local/etc/pkg/repos/df-latest and that's it! Remember to use pkg+https:// for Avalon.
After applying all these changes, we update the packages list again and try to check if there's already a new update to apply:
# pkg update -f
# pkg upgrade -y -f
Package installation
Install the tor package:
# pkg install tor
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).
Install tor
tar -xzf tor-<version>.tar.gz; cd tor-<version>
Replace <version> with the latest version of tor, for example, tor-0.4.8.12
./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.