Skip to content

Commit

Permalink
add new md
Browse files Browse the repository at this point in the history
  • Loading branch information
LYDongD committed Aug 24, 2019
1 parent 798090d commit 36a1566
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
* [文件传输](dev-ops/shell/net/ftp.md)
* [ifconfig](dev-ops/shell/net/ifconfig.md)
* [ssh](dev-ops/shell/net/ssh.md)
* [端口分析](dev-ops/shell/net/port.md)
* [端口分析](dev-ops/shell/net/socket.md)
* [归档与压缩](dev-ops/shell/compress/README.md)
* [tar](dev-ops/shell/compress/tar.md)
* [cpio](dev-ops/shell/compress/cpio.md)
Expand Down
19 changes: 17 additions & 2 deletions dev-ops/shell/net/port.md → dev-ops/shell/net/socket.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## 端口检测
## socket查询

#### lsof

list open file
list open file, socket本质上是一个fd

```
lsof -i 列出所有端口,配合grep查看
Expand All @@ -21,4 +21,19 @@ netstat -ntp
#查看进程占用的端口号
netstat -ltnp | grep 119809
—a/-t/-u/-x 分别对应所有/tcp/udp/unix连接类型
```

#### ss

```
#查看socket摘要
ss -s
##查看监听的tcp端口及其对应的进程
ss -tlp
-t/-u/-x 对应tcp/udp/unix 连接类型
```

0 comments on commit 36a1566

Please sign in to comment.