os: rockylinux9.1 - 网络配置
一、nmcli - 网络配置
1 [root@rocky system-connections]# pwd 2 /etc/NetworkManager/system-connections 3 [root@rocky system-connections]# 4 [root@rocky system-connections]# 5 [root@rocky system-connections]# ls 6 ens160.nmconnection ens160.nmconnection.backup 7 [root@rocky system-connections]# 8 [root@rocky system-connections]# 9 [root@rocky system-connections]# cat ens160.nmconnection 10 [connection] 11 id=ens160 12 uuid=ea0d7d14-dd78-329b-9b40-8f67b67a064d 13 type=ethernet 14 autoconnect-priority=-999 15 interface-name=ens160 16 timestamp=1676470176 17 18 [ethernet] 19 20 [ipv4] 21 address1=10.10.10.15/24,10.10.10.1 22 address2=10.10.10.16/24 23 address3=10.10.10.17/24 24 dns=10.10.10.15;114.114.114.114;8.8.8.8; 25 may-fail=false 26 method=manual 27 28 [ipv6] 29 addr-gen-mode=eui64 30 method=auto 31 32 [proxy] 33 [root@rocky system-connections]# 34 [root@rocky system-connections]#
二、nmcli 命令
1 [root@rocky tmp]# nmcli --help 2 Usage: nmcli [OPTIONS] OBJECT { COMMAND | help } 3 4 OPTIONS 5 -a, --ask ask for missing parameters 6 -c, --colors auto|yes|no whether to use colors in output 7 -e, --escape yes|no escape columns separators in values 8 -f, --fields <field,...>|all|common specify fields to output 9 -g, --get-values <field,...>|all|common shortcut for -m tabular -t -f 10 -h, --help print this help 11 -m, --mode tabular|multiline output mode 12 -o, --overview overview mode 13 -p, --pretty pretty output 14 -s, --show-secrets allow displaying passwords 15 -t, --terse terse output 16 -v, --version show program version 17 -w, --wait <seconds> set timeout waiting for finishing operations 18 19 OBJECT 20 g[eneral] NetworkManager's general status and operations 21 n[etworking] overall networking control 22 r[adio] NetworkManager radio switches 23 c[onnection] NetworkManager's connections 24 d[evice] devices managed by NetworkManager 25 a[gent] NetworkManager secret agent or polkit agent 26 m[onitor] monitor NetworkManager changes 27 28 [root@rocky tmp]# 29 [root@rocky tmp]#
标签:rocky,--,root,网络,system,connections,rockylinux9.1,NetworkManager,os From: https://www.cnblogs.com/lnlidawei/p/17266385.html