As Synaptic uses APT and the Ubuntu package repositories, it installs an old version of Tor. Ubuntu does not keep the tor package up to date, so it is recommended to install tor from the Tor Project repository instead.
The Tor Project maintains a package repository for Ubuntu (thanks to a Debian maintainer). The details to do this on the command line are here: https://support.torproject.org/apt/tor-deb-repo/
Note: This guide may become out-of-date in the future, so please refer to the latest instructions on the Tor Project website at the link above.
I'm not familiar with Synaptic, but I believe these steps should work:
- Make a backup of your tor configuration files (for example
/etc/tor/torrc). This shouldn't be needed with APT, but since I'm not familiar with Synaptic, it's good to be safe.
- Add the Tor Project keys. As far as I know this must be done on the command line. These are to make sure that you're downloading the correct unmodified packages.
sudo wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
sudo gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
- Uninstall the tor package that you currently have installed.
- Add the Tor Project repository following the guide at https://www.ghacks.net/2009/03/08/adding-repositories-to-synaptic/. This should add the package repository somewhere in
/etc/apt/sources.list.d. For Ubuntu 18.04 you'll want to enter the following repositories into the "URI", "Distribution", and "Section" fields:
deb https://deb.torproject.org/torproject.org bionic main
deb-src https://deb.torproject.org/torproject.org bionic main
- Reload the package information.
- Install tor like you did before. Now it should find the latest version (as of today, it should be version 4.2.7).