NMCLI(1) NMCLI(1) (NAME) nmcli - NetworkManager (SYNOPSIS) nmcli [...] {help | general | networking | radio | connection | device | agent | monitor} [] [...] (DESCRIPTION) nmcli NetworkManager . nm-applet . nmcli . nmcli nmcli-examples(7) . : o : NetworkManager nmcli . nmcli . NetworkManager << >> (dispatcher scripts) . NetworkManager(8) . o (headless) : nmcli NetworkManager . (OPTIONS) -a | --ask nmcli . . -c | --colors {yes | no | auto} ( ) . yes no auto . auto . terminal-colors.d(5) . nmcli COLORS . NO_COLOR ( ) "auto" . CLICOLOR_FORCE ( ) "auto" . . --complete-args nmcli . . 65 . NetworkManager GNU Bash . -e | --escape {yes | no} : \ . \ . yes . -f | --fields {field1,field2... | all | common} ( ) . . --fields . all . common . common . -g | --get-values {field1,field2... | all | common} . --mode tabular --terse --fields . . (section) . -h | --help . -m | --mode {tabular | multiline} : tabular . . multiline . . tabular . multiline . : o nmcli connection show ID o nmcli device show -p | --pretty . nmcli . -s | --show-secrets nmcli . (echo) . -t | --terse . () . --offline . connection add connection modify / . nmcli NetworkManager . (keyfile) nm-settings-keyfile(5) . -v | --version nmcli. -w | --wait seconds (timeout) nmcli NetworkManager . . 0 nmcli . . nmcli general {status | hostname | permissions | logging | reload} [...] NetworkManager . (hostname) NetworkManager . status NetworkManager. nmcli general . hostname [hostname] . . NetworkManager . "" "" (persistent) "" (static) . /etc/hostname . systemd-hostnamed "static" /etc/hostname . permissions NetworkManager Wi-Fi WWAN . logging [level level] [domains domains...] NetworkManager. . level domain . NetworkManager.conf(5) . reload [flags...] NetworkManager . SIGHUP NetworkManager flags . - PolicyKit (synchronous) . : conf NetworkManager.conf . nmcli connection reload . dns-rc DNS /etc/resolv.conf . SIGUSR1 NetworkManager . dns-full DNS. dnsmasq /etc/NetworkManager/dnsmasq.d . DNS . . SIGHUP . NetworkManager(8) . (NETWORKING CONTROL COMMANDS) nmcli networking {on | off | connectivity} [...] NetworkManager . on, off NetworkManager. NetworkManager . connectivity [check] . check NetworkManager . : none . portal (captive portal) . limited . full . unknown . (RADIO TRANSMISSION CONTROL COMMANDS) nmcli radio {all | wifi | wwan} [...] . wifi [on | off] Wi-Fi NetworkManager. Wi-Fi on off . wwan [on | off] WWAN ( ) NetworkManager. on off . all [on | off] . (ACTIVITY MONITOR) nmcli monitor NetworkManager. . nmcli connection monitor nmcli device monitor ..SH " (CONNECTION MANAGEMENT COMMANDS)" nmcli connection {show | up | down | modify | add | edit | clone | delete | monitor | reload | load | import | export | migrate} [...] NetworkManager <<>> (connection) ( IP ) . <<>> (active) . . . DHCP IP . eth0 eth0 DHCP ( default) ( testing). DHCP nmcli con up default nmcli con up testing . show [--active] [--order [+-]category:...] . . --active . --order . (active) (name) (type) D-Bus ( path) . . --order active:name:path . + ( ) - () . ( --order -a:na). show [--active] [id | uuid | path | apath] ID... . . --active . --show-secrets . id uuid path apath ID . ID : id ID . uuid ID UUID . path ID D-Bus /org/freedesktop/NetworkManager/Settings/num num . apath ID D-Bus /org/freedesktop/NetworkManager/ActiveConnection/num num . --fields . : profile . active ( ) . . nm-settings-nmcli(5) . GENERAL IP4 DHCP4 IP6 DHCP6 VPN . nmcli connection nmcli connection show . up [id | uuid | path] ID [ifname ifname] [ap BSSID] [passwd-file file] . UUID D-Bus . ID id uuid path . ifname . ID ifname NetworkManager ifname . VPN ifname . ap Wi-Fi (AP) . --wait . ID connection show . : ifname . ap BSSID (AP) ( Wi-Fi). passwd-file . . : setting_name.property_name:the password Wi-Fi WPA PSK : 802-11-wireless-security.psk:secret12345 802.1X : 802-1x.password:my 1X password nmcli wifi-sec wifi 802-11-wireless-security . NetworkManager nmcli --ask . --ask NetworkManager ( nm-applet gnome-shell) . down [id | uuid | path | apath] ID... . . autoconnect . ( ) . device down . UUID D-Bus . ID id uuid path apath . ID connection show . --wait . modify [--temporary] [id | uuid | path] [ID] {option value | [+|-]setting.property value}... . . ("") . nm- settings-nmcli(5) . setting property . + . - . . + - . () ipv4.dns ip4 ipv4.addresses bond.options 802-1x.phase1-auth-flags . UUID D-Bus . ID id uuid path . ID --offline . --offline NetworkManager . modify [--temporary] [id | uuid | path] ID remove setting . add [save {yes | no}] {option value | [+|-]setting.property value}... . . nm-settings-nmcli(5) . nmcli connection modify . connection.type ( type) NetworkManager : o 6lowpan o 802-11-olpc-mesh ( olpc-mesh) o 802-11-wireless ( wifi) o 802-3-ethernet ( ethernet) o adsl o bluetooth o bond o bond-slave ( ethernet ) o bridge o bridge-slave ( ethernet ) o cdma o dummy o generic o gsm o hsr o infiniband o ip-tunnel o ipvlan o loopback o macsec o macvlan o olpc-mesh o ovs-bridge o ovs-interface o ovs-port o pppoe o team o team-slave ( ethernet ) o tun o veth o vlan o vpn o vrf o vxlan o wifi-p2p o wimax o wireguard o wpan EXAMPLES . : save NetworkManager (: yes). -- -- . nmcli . --offline NetworkManager . edit {[id | uuid | path] ID | [type type] [con-name name] } . UUID D-Bus . ID id uuid path . ID connection show . ID . . . : type connection add . con-name . . NetworkManager nm-settings- nmcli(5) nmcli-examples(7) . clone [--temporary] [id | uuid | path] ID new_name () . UUID D-Bus . ID id uuid path . ID connection show . new_name . connection.id (new_name) connection.uuid ( ). --temporary NetworkManager . delete [id | uuid | path] ID... . UUID D-Bus . ID id uuid path . ID connection show . --wait . monitor [id | uuid | path] ID... . . UUID D-Bus . ID id uuid path . ID connection show . . . nmcli monitor . reload . NetworkManager NetworkManager . load filename... / . NetworkManager . import [--temporary] type type file file () NetworkManager. type . VPN . VPN NetworkManager . type vpn-type nmcli connection add . VPN VPN VPN nmcli . --temporary NetworkManager . export [id | uuid | path] ID [file] () . VPN . VPN nmcli . (file) VPN . migrate [--plugin plugin...] [id | uuid | path] [ID...] keyfile () ifcfg-rh. UUID D-Bus . ID id uuid path . ID connection show . . keyfile . --wait . nmcli device {status | show | set | up | connect | reapply | modify | down | disconnect | delete | monitor | wifi | lldp | checkpoint} [...] . status . nmcli device . show [ifname] . . . set [ifname] ifname [autoconnect {yes | no}] [managed [--permanent | --permanent-only] {yes | no | up | down | reset}] . managed --permanent ( ) . --permanent-only . up down . reset --permanent --permanent-only . up ifname . NetworkManager . . . nmcli connection up ifname "$DEVICE" nmcli device up "$DEVICE" . --wait . connect ifname up. 1.34.0 up . reapply ifname . modify ifname {option value | [+|-]setting.property value}... . . . nm- settings-nmcli(5) . . down ifname... . . --wait . disconnect ifname... down. 1.34.0 down . delete ifname... . . bond bridge team . ( ) . --wait . monitor [ifname...] . . . . nmcli monitor . wifi [list [--rescan | auto | no | yes] [ifname ifname] [bssid BSSID]] (AP) Wi-Fi. ifname bssid BSSID . nmcli . --rescan . wifi connect (B)SSID [password password] [wep-key-type {key | phrase}] [ifname ifname] [bssid BSSID] [name name] [private {yes | no}] [hidden {yes | no}] Wi-Fi SSID BSSID. . SSID . : nmcli con up id name. (open) WEP WPA-PSK . IP DHCP . --wait . : password (WEP WPA). wep-key-type WEP key ASCII/HEX phrase (passphrase). ifname . bssid BSSID . name ( NetworkManager ). private yes . . hidden SSID ( ) yes . SSID . wifi hotspot [ifname ifname] [con-name name] [ssid SSID] [band {a | bg | 6GHz}] [channel channel] [password password] () Wi-Fi. Wi-Fi . / WPA WEP . connection down device down . : ifname Wi-Fi . con-name . ssid SSID . band Wi-Fi . channel Wi-Fi . password . nmcli . WPA WEP. --show-secrets . wifi rescan [ifname ifname] [ssid SSID...] NetworkManager . NetworkManager Wi-Fi ( ). ssid SSID SSID . ssid SSID . nmcli device wifi list . wifi show-password [ifname ifname] Wi-Fi . lldp [list [ifname ifname]] (LLDP) . ifname . . checkpoint [--timeout seconds] [ifname...] -- COMMAND... (checkpoint) . . . . . . nmcli agent {secret | polkit | all} nmcli (secret agent) polkit NetworkManager. secret nmcli NetworkManager . nmcli . ( nm-applet) . polkit nmcli polkit . nmcli polkit NetworkManager ( --ask ) . polkit . nmcli polkit NetworkManager polkit . all nmcli NetworkManager polkit. (COLORS) /etc/terminal-colors.d/nmcli.disable . terminal-colors.d(5) . nmcli : connection-activated . connection-activating . connection-disconnecting . connection-external NetworkManager . connection-invisible . connection-deprecated . . connectivity-full . connectivity-limited . connectivity-none . connectivity-portal (captive portal) . connectivity-unknown . device-activated . device-activating . device-disconnected . device-external NetworkManager . device-firmware-missing (firmware) . device-plugin-missing . device-unavailable . device-disabled . manager-running NetworkManager . manager-starting NetworkManager . manager-stopped NetworkManager . permission-auth . permission-no . permission-yes . prompt . state-asleep NetworkManager (suspended). state-connected-global NetworkManager . state-connected-local NetworkManager . state-connected-site NetworkManager . state-connecting NetworkManager. state-disconnected NetworkManager . state-disconnecting NetworkManager . wifi-signal-excellent Wi-Fi . wifi-signal-fair Wi-Fi . wifi-signal-good Wi-Fi . wifi-signal-poor Wi-Fi . wifi-signal-unknown Wi-Fi ( ). wifi-deprecated Wi-Fi . disabled () . enabled () . nmcli . LC_ALL . LC_MESSAGES (locale) . LANG (null) . NO_COLOR . --colors . PAGER (pipe) . . . ANSI ( ) . nmcli LESS LESSCHARSET less(1) . pager(1) less(1) more(1) ( ) . TERM . dumb nmcli ANSI . dumb ASCII . (INTERNATIONALIZATION NOTES) nmcli . (parse) . (locale) C nmcli : LC_ALL=C nmcli LC_ALL LC_MESSAGES LANG LC_MESSAGES ( ) nmcli . C . (EXIT STATUS) nmcli 0 0 . 0 - . 1 . 2 nmcli. 3 ( --wait ). 4 . 5 . 6 . 7 . 8 NetworkManager . 10 . 65 --complete-args . nmcli . nmcli-examples(7) . nmcli -t -f RUNNING general NetworkManager . nmcli -t -f STATE general NetworkManager . nmcli radio wifi off (Wi-Fi) . nmcli connection show NetworkManager . nmcli -p -m multiline -f all con show . nmcli connection show --active . nmcli -f name,autoconnect c s (autoconnect) . nmcli -p connection show "My default em1" "My default em1" . nmcli --show-secrets connection show "My Home Wi-Fi" "My Home Wi-Fi" . --show-secrets . nmcli -f active connection show "My default em1" "My default em1" IP DHCP . nmcli -f profile con s "My wired connection" "My wired connection" . nmcli -p con up "My wired connection" ifname eth0 "My wired connection" eth0 . -p nmcli . nmcli con up 6b028a27-6dc9-4411-9886-e9ad1dd43761 ap 00:3A:98:7C:42:D3 Wi-Fi UUID 6b028a27-6dc9-4411-9886-e9ad1dd43761 (AP) BSSID 00:3A:98:7C:42:D3 . nmcli device status . nmcli dev down em2 em2 . autoconnect TRUE . nmcli -f GENERAL,WIFI-PROPERTIES dev show wlan0 wlan0 GENERAL WIFI-PROPERTIES . nmcli -f CONNECTIONS device show wlp3s0 Wi-Fi (wlp3s0) . nmcli dev wifi Wi-Fi NetworkManager . nmcli dev wifi con "Cafe Hotspot 1" password caffeine name "My cafe" "My cafe" "caffeine" SSID "Cafe Hotspot 1" . "Cafe Hotspot 1" . nmcli con up id "My cafe" . nmcli -s dev wifi hotspot con-name QuickHotspot () . . nmcli dev modify em1 ipv4.method shared IPv4 em1 . . nmcli dev modify em1 ipv6.address 2001:db8::a:bad:c0de IP . . nmcli connection add type ethernet autoconnect no ifname eth0 eth0 IP ( DHCP) autoconnect . nmcli c a ifname Maxipes-fik type vlan dev eth0 id 55 VLAN 55 . eth0 VLAN Maxipes-fik . nmcli c a ifname eth0 type ethernet ipv4.method disabled ipv6.method link-local eth0 (link-local) IPv6 . nmcli connection edit ethernet-em1-2 "ethernet-em1-2" . nmcli connection edit type ethernet con-name "yet another Ethernet connection" . nmcli con mod ethernet-2 connection.autoconnect no autoconnect connection ethernet-2 . nmcli con mod "Home Wi-Fi" wifi.mtu 1350 mtu wifi Home Wi-Fi . nmcli con mod em1-1 ipv4.method manual ipv4.addr "192.168.1.23/24 192.168.1.1, 10.10.1.5/8, 10.0.0.11" em1-1 . nmcli con modify ABC +ipv4.dns 8.8.8.8 DNS DNS ABC . nmcli con modify ABC -ipv4.addresses "192.168.100.25/24 192.168.1.1" IP () ABC . nmcli con import type openvpn file ~/Downloads/frootvpn.ovpn OpenVPN NetworkManager . nmcli con export corp-vpnc /home/joe/corpvpn.conf VPN corp-vpnc NetworkManager (vpnc) . (NOTES) nmcli . . . (BUGS) . : https://gitlab.freedesktop.org/NetworkManager/NetworkManager (SEE ALSO) nmcli-examples(7) nm-settings-nmcli(5) nm-online(1) NetworkManager(8) NetworkManager.conf(5) nm-applet(1) nm- connection-editor(1) terminal-colors.d(5). NetworkManager 1.58.1 NMCLI(1)