Update nmcli.md (#333)

This commit is contained in:
Marnm 2022-02-19 21:42:47 +08:00 committed by GitHub
parent 94ed285caa
commit a78e4a0cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -53,3 +53,14 @@ nmcli con add help # 查看帮助
```
### 创建网络会话
```shell
nmcli connection add con-name company ifname ens33 autoconnect no type ethernet ip4 192.168.1.2/24 gw4 192.168.1.1
# con-name 指定会话名称,
# ifname 指定本机网卡
# autoconnect no 是否自动连接
# ethernet 指定网卡类型
# ip4/ip6
# gw4/gw5
```