linux(ubuntu/kali)如何查看端口开启了哪些
在命令窗口输入: netstat -tlnp
root@kevin-virtual-machine:~# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 57369/cupsd
tcp 0 0 127.0.0.1:43783 0.0.0.0:* LISTEN 58447/rygel
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 68861/sshd: /usr/sb
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1077/smbd
tcp 0 0 192.168.244.128:44649 0.0.0.0:* LISTEN 58447/rygel
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1077/smbd
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 573/systemd-resolve
tcp6 0 0 :::22 :::* LISTEN 68861/sshd: /usr/sb
tcp6 0 0 :::21 :::* LISTEN 937/vsftpd
tcp6 0 0 :::139 :::* LISTEN 1077/smbd
tcp6 0 0 :::445 :::* LISTEN 1077/smbd
tcp6 0 0 fe80::d961:9729:8:46581 :::* LISTEN 58447/rygel
tcp6 0 0 ::1:35707 :::* LISTEN 58447/rygel
tcp6 0 0 ::1:631 :::* LISTEN 57369/cupsd
tcp6 0 0 :::3389 :::* LISTEN 1681/gnome-remote-d