相同点 这2个都是查看端口的工具,例如: netstat -nltp | grep 6379; lsof -i:6379; 区别 命令描述范围netstat可以看到 协议,主机,pid无权限限制losf可以看到 pid,用户名,进程名当前用户