Excerpt |
---|
ss or netstat are useful command line tool can list up open ports combined with network services for TCP/UDP. And you can stop/disable/remove that service by systemctl and dnf. Finally you can see process tree by pstree or htop to discover and identify all the process running on your server. |
Below commands to show the running process combined with open ports:
Code Block |
---|
# ss -tulpn OR # netstat -tulpn |
Below is the example of ss -tulpn
Code Block |
---|
# ss -tulpn Netid State Recv-Q Send-Q Local Address:Port Peer Address:Po rt udp UNCONN 0 0 127.0.0.1:323 *:* udp UNCONN 0 0 *:11211 *:* udp UNCONN 0 0 ::1:323 :::* udp UNCONN 0 0 :::11211 :::* tcp LISTEN 0 100 *:25 *:* tcp LISTEN 0 128 *:11211 *:* tcp LISTEN 0 128 127.0.0.1:6379 *:* tcp LISTEN 0 128 *:22 *:* tcp LISTEN 0 100 :::25 :::* tcp LISTEN 0 32 :::8090 :::* tcp LISTEN 0 10 :::28090 :::* tcp LISTEN 0 128 :::8091 :::* tcp LISTEN 0 128 :::28091 :::* tcp LISTEN 0 128 :::443 :::* tcp LISTEN 0 1 ::ffff:127.0.0.1:8000 :::* tcp LISTEN 0 1 ::ffff:127.0.0.1:28000 :::* tcp LISTEN 0 1 ::ffff:127.0.0.1:28105 :::* tcp LISTEN 0 128 :::3306 :::* tcp LISTEN 0 128 :::11211 :::* tcp LISTEN 0 128 :::80 :::* tcp LISTEN 0 100 :::28180 :::* tcp LISTEN 0 128 :::22 :::* |
Below is another example to stop/disable/remove the service (postfix)
Code Block |
---|
# systemctl stop postfix # systemctl disable postfix # dnf remove postfix |
Below is example of installing psmic and show process tree by pstree