Ubuntu,mac查看端口命令
2014-09-16 14:01
288 查看
ubuntu查看端口
#查看进程端口号及运行的程序
sudo netstat -antup
#PID为端口号远行进程的号
sudo kill PID(进程码)
# 查看所有打开的端口及服务名(注意这里显示的服务名只是标准端口对应的服务名,可能并不准确)
nmap localhost
# 查看哪些进程打开了指定端口port(对于守护进程必须以root用户执行才能查看到)
lsof -i:port
# 查看哪些进程打开了指定端口port,最后一列是进程ID(此方法对于守护进程作用不大)
netstat -nap|grep port
# 查看端口号对应的系统服务名称
cat /etc/services
# 启动|停止|重启系统服务
sudo /etc/init.d/service start|stop|restart
from http://thiger.blog.hexun.com/46497959_d.html
linux + mac
Lsof命令示例
你可以输入下面的命令来查看IPv4端口:(最好加 sudo)
# lsof -Pnl +M -i4
# sudo lsof -Pnl +M -i4
你可以输入下面的命令来查看IPv6协议下的端口列示:
# lsof -Pnl +M -i6
[html] view
plaincopy
# lsof -Pnl +M -i6
#查看进程端口号及运行的程序
sudo netstat -antup
#PID为端口号远行进程的号
sudo kill PID(进程码)
# 查看所有打开的端口及服务名(注意这里显示的服务名只是标准端口对应的服务名,可能并不准确)
nmap localhost
# 查看哪些进程打开了指定端口port(对于守护进程必须以root用户执行才能查看到)
lsof -i:port
# 查看哪些进程打开了指定端口port,最后一列是进程ID(此方法对于守护进程作用不大)
netstat -nap|grep port
# 查看端口号对应的系统服务名称
cat /etc/services
# 启动|停止|重启系统服务
sudo /etc/init.d/service start|stop|restart
from http://thiger.blog.hexun.com/46497959_d.html
linux + mac
Lsof命令示例
你可以输入下面的命令来查看IPv4端口:(最好加 sudo)
# lsof -Pnl +M -i4
# sudo lsof -Pnl +M -i4
你可以输入下面的命令来查看IPv6协议下的端口列示:
# lsof -Pnl +M -i6
[html] view
plaincopy
# lsof -Pnl +M -i6
相关文章推荐
- Ubuntu,mac查看端口命令
- ubuntu查看端口命令
- ubuntu查看端口命令
- mac os x查看端口命令
- Ubuntu终端命令--查看端口占用及关闭
- Ubuntu终端命令查看端口占用及关闭
- Mac 下 查看 使用某端口的进程和关闭该进程的命令
- ubuntu, mac 查看端口 port
- Ubuntu查看端口命令
- linux(Ubuntu/Centos) iproute 路由IP地址等命令集合,查看端口链接
- Dos命令查看端口占用及关闭进程 (MAC系统下)
- Mac 下 查看 使用某端口的进程和关闭该进程的命令
- Linux MacOS 查看端口占用及关闭命令
- 思科查看IP和MAC及交换机端口的命令
- ubuntu查看进程占用端口命令
- Ubuntu端口命令---查看端口占用及关闭
- 运行CMD 查看端口命令及端口功能详解
- 两个命令查看端口占用进程
- 查看端口命令及端口功能详解
- 查看端口和服务及编译UBB命令操作