Skip to content

Commit 3f94a4f

Browse files
committed
ss.md 代码高亮
1 parent a34ec2b commit 3f94a4f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

command/ss.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ ss [参数] [过滤]
5151

5252
### 实例
5353

54-
```
55-
ss -t -a 显示TCP连接
56-
ss -s 显示 Sockets 摘要
57-
ss -l 列出所有打开的网络连接端口
58-
ss -pl 查看进程使用的socket
59-
ss -lp | grep 3306 找出打开套接字/端口应用程序
54+
```bash
55+
ss -t -a # 显示TCP连接
56+
ss -s # 显示 Sockets 摘要
57+
ss -l # 列出所有打开的网络连接端口
58+
ss -pl # 查看进程使用的socket
59+
ss -lp | grep 3306 # 找出打开套接字/端口应用程序
6060
ss -u -a 显示所有UDP Sockets
61-
ss -o state established '( dport = :smtp or sport = :smtp )' 显示所有状态为established的SMTP连接
62-
ss -o state established '( dport = :http or sport = :http )' 显示所有状态为Established的HTTP连接
63-
ss -o state fin-wait-1 '( sport = :http or sport = :https )' dst 193.233.7/24 列举出处于 FIN-WAIT-1状态的源端口为 80或者 443,目标网络为 193.233.7/24所有 tcp套接字
61+
ss -o state established '( dport = :smtp or sport = :smtp )' # 显示所有状态为established的SMTP连接
62+
ss -o state established '( dport = :http or sport = :http )' # 显示所有状态为Established的HTTP连接
63+
ss -o state fin-wait-1 '( sport = :http or sport = :https )' dst 193.233.7/24 # 列举出处于 FIN-WAIT-1状态的源端口为 80或者 443,目标网络为 193.233.7/24所有 tcp套接字
6464

6565
# ss 和 netstat 效率对比
6666
time netstat -at
@@ -84,7 +84,7 @@ ss src 192.168.119.103:25
8484

8585
**将本地或者远程端口和一个数比较**
8686

87-
```
87+
```bash
8888
# ss dport OP PORT 远程端口和一个数比较;
8989
# ss sport OP PORT 本地端口和一个数比较
9090
# OP 可以代表以下任意一个:
@@ -108,7 +108,7 @@ ss -o state fin-wait-1 \( sport = :http or sport = :https \) dst 192.168.1/24
108108

109109
**用TCP 状态过滤Sockets**
110110

111-
```
111+
```bash
112112
ss -4 state closing
113113
# ss -4 state FILTER-NAME-HERE
114114
# ss -6 state FILTER-NAME-HERE

0 commit comments

Comments
 (0)