Linux

来自YS的笔记
Yaosong讨论 | 贡献2019年5月5日 (日) 17:21的版本 →‎端口检测
跳到导航 跳到搜索


工具

  • [jq] 一个轻量级且灵活的命令行JSON处理器
  • [ag] The Silver Searcher代码搜索工具
  • [.vimrc] vim默认配置


其他


端口检测

  • 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