[linux下查找端口号对应的服务名] linux 进程对应端口号
[linux下查找端口号对应的服务名] linux 进程对应端口号
linux命令在系统中有两种类型:内置Shell命令和Linux命令。那么你知道linux下查找端口号对应的服务名么?接下来是小编为大家收集的linux下查找端口号对应的服务名,欢迎大家阅读:
linux下查找端口号对应的服务名
1)grep -w 端口号/etc/services
2)grep “\b端口号\b” /etc/services
以2049端口为例,执行grep -w 2049 /etc/services或grep “\b2049\b” /etc/services 即可查找到其对应的服务名为nfs
grep -w 2049 /etc/services
nfs 2049/tcp nfsd shilp # Network File System
nfs 2049/udp nfsd shilp # Network File System
nfs 2049/sctp nfsd shilp # Network File System
# grep “\b2049\b” /etc/services
nfs 2049/tcp nfsd shilp # Network File System
nfs 2049/udp nfsd shilp # Network File System