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.

如果您需要在您的基于 Debian 的系统中添加 Tor 软件包仓库,请遵循以下指示:

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.

1. 安装 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).

   # apt install apt-transport-https

2. 将以下条目加到 "/etc/apt/sources.list" 后,或者 “/etc/apt/sources.list.d/” 中的一个新文件中。

   deb <DISTRIBUTION> main
   deb-src <DISTRIBUTION> main


   deb tor-experimental-0.3.4.x-<DISTRIBUTION> main
   deb-src tor-experimental-0.3.4.x-<DISTRIBUTION> main


   deb tor-nightly-master-<DISTRIBUTION> main
   deb-src tor-nightly-master-<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=amd64] focal main
   deb-src [arch=amd64] focal main

Warning symptom, when running sudo apt update:

   Skipping acquire of configured file 'main/binary-i386/Packages' as repository ' focal InRelease' doesn't support architecture 'i386'

3. 然后,在命令窗口中运行下面的命令来添加用于签名软件包的 gpg 公钥:

   # wget -qO- | gpg --import
   # gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -

4. 安装 tor 和 tor debian 密钥串

我们提供一个 Debian 软件包,以帮助您保持我们的密钥为最新状态。推荐您使用这个软件包。用下列命令安装它:

   # apt update
   # apt install tor