标签:mode for dns 接口 finish code inux oca display
Centos8已经废弃了network.service
,请使用nmcli
[root@localhost ~]# nmcli --help
Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }
OPTIONS
-a, --ask ask for missing parameters
-c, --colors auto|yes|no whether to use colors in output
-e, --escape yes|no escape columns separators in values
-f, --fields <field,...>|all|common specify fields to output
-g, --get-values <field,...>|all|common shortcut for -m tabular -t -f
-h, --help print this help
-m, --mode tabular|multiline output mode
-o, --overview overview mode
-p, --pretty pretty output
-s, --show-secrets allow displaying passwords
-t, --terse terse output
-v, --version show program version
-w, --wait <seconds> set timeout waiting for finishing operations
OBJECT
g[eneral] NetworkManager‘s general status and operations
n[etworking] overall networking control
r[adio] NetworkManager radio switches
c[onnection] NetworkManager‘s connections
d[evice] devices managed by NetworkManager
a[gent] NetworkManager secret agent or polkit agent
m[onitor] monitor NetworkManager changes
# nmcli c reload
# nmcli c up <网卡>
# nmcli con
NAME UUID TYPE DEVICE
ens33 36a7b552-ab17-4b2d-afd9-de96c6c935eb ethernet ens33
# nmcli connection show xxx
# nmcli connection show --active
# nmcli connection delete xxx
# nmcli connection modify xxx ipv4.addresses 192.168.0.51
# nmcli connection modify xxx ipv4.addresses 192.168.0.51/24
# nmcli connection modify xxx ipv4.method manual
# nmcli connection modify xxx +ipv4.addresses 192.168.0.51/24
# nmcli connection modify xxx -ipv4.addresses 192.168.0.51/24
# nmcli connection modify xxx ipv4.dns 114.114.114.114
# nmcli connection modify xxx -ipv4.dns 114.114.114.114
# nmcli connection modify xxx ipv4.gateway 192.168.0.1
# nmcli connection modify xxx ipv4.dns 114.114.114.114 ipv4.gateway 192.168.0.1
标签:mode for dns 接口 finish code inux oca display
原文地址:https://www.cnblogs.com/wangyang0210/p/13868467.html