您可以使用以下命令来查看 Linux 系统上的端口占用情况:- netstat -tuln | grep 端口号- lsof -i :端口号netstat -tuln 用于查看 TCP/UDP 端口状态,grep 用于过滤指定的端口号,lsof -i :端口号 用于查看指定端口的进程信息。