How to Install and Uninstall tcptrack on Ubuntu 22.04

Updated: September 22, 2022

tcptrack is a sniffer which displays information about TCP connections it sees on a network interface. It passively watches for connections on the network interface, keeps track of their state and displays a list of connections in a manner similar to the unix ‘top’ command. It displays source and destination addresses and ports, connection state, idle time, and bandwidth usage. I will show you how to install tcptrack on Ubuntu 22.04 in this tutorial.

Requirements to install

  • Operating system: Ubuntu 22.04 is needed for tcptrack to work
  • Privileges: Ascertain that you are able to execute sudo commands.

Prerequisites to install tcptrack on Ubuntu 22.04

Install tcptrack Ubuntu 22.04

tcptrack is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install tcptrack using APT

This is a popular method for installing any Ubuntu packages because it is simple to understand, even if you are a Linux beginner. Following these steps to install tcptrack on your Ubuntu 22.04.

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install tcptrack Ubuntu by executing this command in the terminal.

sudo apt install tcptrack

Install tcptrack using Aptitude

Aptitude allows users to view a list of available packages and manage package installation, upgrade, and removal. If you haven’t already done so, run this command to install it.

sudo apt -y install aptitude

After installing it, you can now install tcptrack by following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Opening the terminal and executing this Linux command:

sudo apt-get -y update

Step 2: Install the package on Ubuntu 22.04. You can now install tcptrack Ubuntu by executing this command in the terminal.

sudo aptitude install tcptrack

Uninstall tcptrack on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu is difficult? You are mistaken; Anyone can easily uninstall any program, not just tcptrack.

If you installed tcptrack using APT or Aptitude, you could uninstall tcptrack on Ubuntu by running this command

sudo apt remove --auto-remove tcptrack

You can also execute this command if you want to uninstall tcptrack and remove its data and dependencies:

sudo apt autoremove --purge tcptrack

Summary

In this guide, I showed you ways to install tcptrack on Ubuntu 22.04 and some ways to uninstall tcptrack too. Please do not hesitate to contact me if you require assistance. I’m delighted to respond.