语法

    1. netstat [选项]

    选项

    -an        按一定顺序排列输出
    -p        显示哪个进程在调用
    

    例子

    #查看服务名为sshd的服务的信息
    netstat -anp | grep sshd