How To Install tor on CentOS 8

tor is Anonymizing overlay network for TCP

Introduction

In this tutorial we learn how to install tor on CentOS 8.

What is tor

The Tor network is a group of volunteer-operated servers that allows people to improve their privacy and security on the Internet. Tor’s users employ this network by connecting through a series of virtual tunnels rather than making a direct connection, thus allowing both organizations and individuals to share information over public networks without compromising their privacy. Along the same line, Tor is an effective censorship circumvention tool, allowing its users to reach otherwise blocked destinations or content. Tor can also be used as a building block for software developers to create new communication tools with built-in privacy features. This package contains the Tor software that can act as either a server on the Tor network, or as a client to connect to the Tor network.

We can use yum or dnf to install tor on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install tor.

Install tor on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install tor using dnf by running the following command:

sudo dnf -y install tor

Install tor on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install tor using yum by running the following command:

sudo yum -y install tor

How To Uninstall tor on CentOS 8

To uninstall only the tor package we can use the following command:

sudo dnf remove tor

tor Package Contents on CentOS 8

/etc/logrotate.d/tor
/etc/tor
/etc/tor/README
/etc/tor/torrc
/run/tor
/usr/bin/tor
/usr/bin/tor-gencert
/usr/bin/tor-print-ed-signing-cert
/usr/bin/tor-resolve
/usr/bin/torify
/usr/lib/.build-id
/usr/lib/.build-id/68
/usr/lib/.build-id/68/5946305926285260da2430e90043531ed6f5b6
/usr/lib/.build-id/6e
/usr/lib/.build-id/6e/f1d7f22552889f3cab036477df2e8234c4f567
/usr/lib/.build-id/97
/usr/lib/.build-id/97/c503e3f71023f98a5feda1c0bf988c35181c23
/usr/lib/.build-id/9d
/usr/lib/.build-id/9d/1a2974e6e12d44a6c049e5c679f17a5eec9eac
/usr/lib/systemd/system/tor-master.service
/usr/lib/systemd/system/tor.service
/usr/lib/systemd/system/[email protected]
/usr/lib/tmpfiles.d/tor.conf
/usr/share/doc/tor
/usr/share/doc/tor/ChangeLog
/usr/share/doc/tor/HACKING
/usr/share/doc/tor/HACKING/CodingStandards.md
/usr/share/doc/tor/HACKING/CodingStandardsRust.md
/usr/share/doc/tor/HACKING/Fuzzing.md
/usr/share/doc/tor/HACKING/GettingStarted.md
/usr/share/doc/tor/HACKING/GettingStartedRust.md
/usr/share/doc/tor/HACKING/HelpfulTools.md
/usr/share/doc/tor/HACKING/HowToReview.md
/usr/share/doc/tor/HACKING/Module.md
/usr/share/doc/tor/HACKING/README.1st.md
/usr/share/doc/tor/HACKING/ReleasingTor.md
/usr/share/doc/tor/HACKING/WritingTests.md
/usr/share/doc/tor/README
/usr/share/doc/tor/ReleaseNotes
/usr/share/doc/tor/tor-gencert.html
/usr/share/doc/tor/tor-print-ed-signing-cert.html
/usr/share/doc/tor/tor-resolve.html
/usr/share/doc/tor/tor.html
/usr/share/doc/tor/torify.html
/usr/share/licenses/tor
/usr/share/licenses/tor/LICENSE
/usr/share/man/man1/tor-gencert.1.gz
/usr/share/man/man1/tor-print-ed-signing-cert.1.gz
/usr/share/man/man1/tor-resolve.1.gz
/usr/share/man/man1/tor.1.gz
/usr/share/man/man1/torify.1.gz
/usr/share/tor
/usr/share/tor/defaults-torrc
/usr/share/tor/geoip
/usr/share/tor/geoip6
/var/lib/tor
/var/log/tor

References

Summary

In this tutorial we learn how to install tor on CentOS 8 using yum and dnf.