Nmcli: Difference between revisions
From DikapediaV2
(Created page with "<b>Network Manager Command Line</b> - is used for controlling NetworkManager and reporting network status. ====Check connection status of interfaces==== ---- <b>nmcli dev status</b> # nmcli dev status DEVICE TYPE STATE CONNECTION docker0 bridge connected docker0 virbr0 bridge connected virbr0 enp0s3 ethernet connected enp0s3 virbr0-nic ethernet disconnected -- lo loopback u...") |
No edit summary |
||
Line 22: | Line 22: | ||
# nmcli connection up ens192 | # nmcli connection up ens192 | ||
Connection 'ens192' successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2) | Connection 'ens192' successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2) | ||
====Turn Networking Up or Down==== | |||
---- | |||
nmcli networking off | |||
nmcli networking on | |||
Latest revision as of 19:38, 11 December 2024
Network Manager Command Line - is used for controlling NetworkManager and reporting network status.
Check connection status of interfaces
nmcli dev status
# nmcli dev status DEVICE TYPE STATE CONNECTION docker0 bridge connected docker0 virbr0 bridge connected virbr0 enp0s3 ethernet connected enp0s3 virbr0-nic ethernet disconnected -- lo loopback unmanaged --
Turn Connection Up or Down
nmcli connection down <interface> or nmcli connection up <interface>
# nmcli connection down ens192 Connection 'ens192' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)
# nmcli connection up ens192 Connection 'ens192' successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
Turn Networking Up or Down
nmcli networking off nmcli networking on
Turn Autoconnect On/Off
Turn on:
# nmcli connection modify ens192 connection.autoconnect yes
Turn of:
# nmcli connection modify ens192 connection.autoconnect no
Or you can do the typical way of editing:
# vi /etc/sysconfig/network-scripts/ifcfg-ens192 . . . ONBOOT=<yes/no>