How To Install tcptrack on Ubuntu 18.04

In this tutorial we learn how to install tcptrack on Ubuntu 18.04. tcptrack is TCP connection tracker, with states and speeds

Introduction

In this tutorial we learn how to install tcptrack on Ubuntu 18.04.

What is tcptrack

tcptrack is:

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.

There are three methods to install tcptrack on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install tcptrack Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install tcptrack using apt-get by running the following command:

sudo apt-get -y install tcptrack

Install tcptrack Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tcptrack using apt by running the following command:

sudo apt -y install tcptrack

Install tcptrack Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install tcptrack using aptitude by running the following command:

sudo aptitude -y install tcptrack

How To Uninstall tcptrack on Ubuntu 18.04

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

sudo apt-get remove tcptrack

Uninstall tcptrack And Its Dependencies

To uninstall tcptrack and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove tcptrack

Remove tcptrack Configurations and Data

To remove tcptrack configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge tcptrack

Remove tcptrack configuration, data, and all of its dependencies

We can use the following command to remove tcptrack configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tcptrack

References

Summary

In this tutorial we learn how to install tcptrack package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.