Greenwebpage Community Blog Tutorials How to Install Netstat on Debian 12
Tutorials

How to Install Netstat on Debian 12

Netstat is a tool used for inspecting and monitoring network connections through terminals. With Netstat, you can view statistics such as active connections, routing, and interfaces of your network connections. This utility enables you to analyze and troubleshoot network issues on your Debian 12 system.

In this detailed guide, you can install Netstat on your Debian 12 using different methods.

How to Install Netstat on Debian 12?

This comprehensive guide covers:

  • Set up Netstat from APT Package Manager on Debian 12.
  • Configure Netstat from the Source File (.deb) on Debian 12.
  • Use Netstat on the Debian 12 System.
  • Uninstall Netstat from the Debian 12 System.

How to Set up Netstat from APT Package Manager on Debian 12?

APT package manager is a simple tool for installing Netstat on your Debian 12 system.

Step 1: Install Netstat using APT

Netstat is a built-in package within net-tools, which contains various networking tools. To utilize the netstat, install the net-tools using the command:

sudo apt install net-tools
sudo apt install net-tools

In the output, you can observe the net-tools and their associated dependencies have been installed on your Debian 12 system.

Step 2: Check Netstat’s Version Number

You can verify the Netstat’s version number after installation through the command:

netstat -V

The current version of net-tools on your Debian 12 is “2.10”.

How to Configure Netstat from the Source File (.deb) on Debian 12?

The Netstat can also be installed from the source file (.deb) on your Debian 12 system.

Step 1: Download the Netstat Source File in “.deb”

Before starting the installation of Netstat, you need to download the source file in .deb format. Use the “wget” command followed by the Netstat source link to download the Debian file to your local directory, such as “~/Downloads”:

wget http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_2.10-0.1_amd64.deb

When the downloading process reaches 100%, the file will be saved to the ~/Downloads folder.

Step 2: Install Netstat using “dpkg”

For the unpacking and installing the .deb files, utilize the “dpkg” package installer in the following manner:

sudo dpkg -i net-tools_2.10-0.1_amd64.deb

Through this command, the files and directories for the net-tools have successfully been installed on your Debian 12 system.

Step 3: Verify Netstate After Installation

To check whether the Netstat is now available on your Debian 12 system, use the command:

netstat -V

If you see the version number, such as “net-tools 2.10” on your Debian terminal, it indicates that you have configured the Netstat successfully.

How to Use Netstat on the Debian 12 System?

How to utilize the netstat on your Debian 12 terminal, here are two examples.

Example 1: Monitor Interface Table

Use the “i” option with netstat to display the statistics of your network interface:

netstat -i

You can analyze the network interface table on your terminal screen.

Example 2: Inspect All Active Network Connections

You can use the “-a” option to inspect all active network connections on your Debian 12

netstat -a
 

All the active internet connections can be viewed on your terminal screen.

How to Uninstall Netstat from the Debian 12 System?

To update your net-tools package on your Debian 12 system, you need to remove the old or current version first.

Step 1: Uninstall Netstat

With the help of the APT package manager, you can completely remove net-tools from your system:

sudo apt purge net-tools

The above output indicates that all the required files have been removed from your system.

Conclusion

The Netstat is part of the net-tools package, which can be installed using different methods. You can use an APT package manager like “sudo apt install net-tools” or utilize the DPKG after downloading the source file in Debian format.

Both methods provide a straightforward way to install and configure the Netstat networking tool on your Debian 12 system.

Exit mobile version