lsof 查看端口占用lsof 是一个 shell 指令,用于列出当前系统打开的文件。
lsof 查看端口占用的语法格式如下:
lsof -i:[端口号]
在 Linux 上需要 root 权限,而 MacOS 上不需要。
例:查看电脑
2023-01-23