Languages
[Edit]
EN

Bash - list used unix socket files under Linux / Unix

5 points
Created by:
Wade
562

In this short article, we would like to show you, how to show both listening and non-listening unix sockets with corresponing files and processes using Bash.

Quick solution (run the following command):

Where:

  • -a causes showing both listening and non-listening sockets,
  • -p causes adding process PID and name to results,
  • --unix causes showing only unix sockets.

Example output:

Warning: in Debian 11 netstat was marked as depricated and may be not available by default (to install it use: sudo apt-get install net-tools).

 

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join