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:
Note: The symbol # refers to running the code as root. This means you should have access to a user account with system administration privileges, e.g your user should be in the sudo group.
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).
# apt install apt-transport-https
2. Add the following entries to
/etc/apt/sources.list or a new file in
deb https://deb.torproject.org/torproject.org <DISTRIBUTION> main
deb-src https://deb.torproject.org/torproject.org <DISTRIBUTION> main
If you want to try experimental packages, add these in addition to the lines from above (Note, use whatever is the current experimental version instead of 0.4.5.x from the example below):
deb https://deb.torproject.org/torproject.org tor-experimental-0.4.5.x-<DISTRIBUTION> main
deb-src https://deb.torproject.org/torproject.org tor-experimental-0.4.5.x-<DISTRIBUTION> main
Or nightly builds:
deb https://deb.torproject.org/torproject.org tor-nightly-master-<DISTRIBUTION> main
deb-src https://deb.torproject.org/torproject.org tor-nightly-master-<DISTRIBUTION> main
<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=amd64] https://deb.torproject.org/torproject.org focal main
deb-src [arch=amd64] https://deb.torproject.org/torproject.org focal main
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. Then add the gpg key used to sign the packages by running the following commands at your command prompt
# wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
# gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
4. 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:
# apt update
# apt install tor deb.torproject.org-keyring