Linux
跳到导航
跳到搜索
工具
- [jq] 一个轻量级且灵活的命令行JSON处理器
其他
端口检测
- telnet
在telnet连接成功后,使用Control +]然后使用Control + D退出它。 列出所有TCP连接套接字
sudo netstat --all --numeric --tcp --programs
- lsof
监听ipv4进程
sudo lsof -n -i4TCP:5672 | grep LISTEN
IPv6的程序:
sudo lsof -n -i6TCP:5672 | grep LISTEN
- ss
使用ss显示使用IPv4及其操作系统进程的侦听TCP套接字:
sudo ss --tcp -f inet --listening --numeric --processes
同样,对于使用IPv6的TCP套接字:
sudo ss --tcp -f inet6 --listening --numeric --processes