Linux端口占用查询

    技术2022-07-10  128

    1.lsof使用

    lsof i: 端口号 or lsof i

    2.netstat使用

    netstat -tunpl | grep 端口号 netstat -anp | grep 端口号/PID

    3.ps使用

    ps -ef | grep 进程id(PID) ps -aux | grep 程序名字/PID //查程序占用的所有端口
    Processed: 0.017, SQL: 9