在Ubuntu18.04上运行ss -ltun命令之后,我得到以下内容:
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 0.0.0.0:55656 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:631 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:857 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:5353 0.0.0.0:*
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:68 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:111 0.0.0.0:*
udp UNCONN 0 0 [::]:857 [::]:*
udp UNCONN 0 0 [::]:33678 [::]:*
udp UNCONN 0 0 [::]:5353 [::]:*
udp UNCONN 0 0 [::]:111 [::]:*
tcp LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
tcp LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:*
tcp LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
tcp LISTEN 0 128 127.0.0.1:9050 0.0.0.0:*
tcp LISTEN 0 128 [::]:111 [::]:*
tcp LISTEN 0 5 [::1]:631 [::]:* 举个例子,我不知道端口111用于什么,也不知道它为什么是打开的,所以我运行了以下命令:
$ grep 111 /etc/services
sunrpc 111/tcp portmapper # RPC 4.0 portmapper
sunrpc 111/udp portmapper
dicom 11112/tcp
kx 2111/tcp # X over Kerberos现在我知道它是针对sunrpc的,但我仍然不知道是哪个程序负责它,以及我如何关闭它(我应该关闭它吗?)运行systemctl list-sockets显示了一些单位,但没有说明他们管理哪个港口(S)。
发布于 2020-03-22 12:14:08
将-p选项添加到ss中,它将使用端口列出进程:
ss -ultnp要查看所有进程,您需要将其作为root运行:
sudo ss -ultnphttps://unix.stackexchange.com/questions/574238
复制相似问题