netstat -tan | grep '\<LISTEN.*\>' netstat -tan | grep 'LISTEN[[:space:]]*$' 转载于:https://blog.51cto.com/xw5523/1930131