netstat command not found - Debian 12
How to Install netstat Command on Debian 12
In Debian 12, the netstat command is no longer available by default as it has been deprecated and replaced by the ss command. However, if you still prefer to use netstat for network troubleshooting and monitoring, you can install it by following these steps:
-
Open a Terminal: You can open a terminal by pressing
Ctrl + Alt + Tor by searching for “Terminal” in the application menu. -
Update Package Repository: Before installing
netstat, it’s recommended to update the package repository to ensure you have the latest package information. Run the following command:sudo apt update -
Install net-tools Package: The
netstatcommand is included in thenet-toolspackage. You can install it by running the following command:sudo apt install net-tools
<ins class=“adsbygoogle” <style=“display:block; text-align:center;” <data-ad-layout=“in-article” <data-ad-format=“fluid” <data-ad-client=“ca-pub-3694707216928989” <data-ad-slot=“8801045010”>
netstat --version
If the command displays the version information, then netstat has been successfully installed on your Debian 12 system.
- Using netstat: You can now use
netstatto display network connections, routing tables, interface statistics, and more. Refer to thenetstatmanual (man netstat) for detailed usage options and syntax.
Conclusion
Even though netstat has been deprecated in favor of ss, it can still be installed on Debian 12 for compatibility with scripts or workflows that rely on its functionality. By following the steps outlined in this tutorial, you can have netstat available for network troubleshooting and monitoring purposes on your Debian 12 system.