Sample Header Ad - 728x90

Where does ss command gather its data for ports etc

0 votes
2 answers
2551 views
When trying to see port clashes within my system, many websites online recommend using **/etc/services** or **ss -tunl** to see port info I am noticing **/etc/services** is providing different information to **-ss** on most occasions. Output comparison examples sudo cat /etc/services ftp 21/udp ftp 21/sctp ssh 22/tcp ssh 22/udp ssh 22/sctp telnet 23/tcp telnet 23/udp smtp 25/tcp versus ss -tunl Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port udp UNCONN 0 0 0.0.0.0:5353 0.0.0.0:* udp UNCONN 0 0 0.0.0.0:46670 0.0.0.0:* udp UNCONN 0 0 [::]:5353 [::]:* udp UNCONN 0 0 [::]:38838 [::]:* Is **/etc/services** a static data file and should only be used as a guide, not an true reflection of what the real port configuration of the system is. Where does **ss** program gather this port data, and how can I modify/delete some of the ports, either through **ss** or another program?
Asked by Rachel1983 (23 rep)
Apr 7, 2024, 04:21 PM
Last activity: Apr 7, 2024, 05:03 PM