nmcli | Cheatsheet¶
nmcli is a command-line tool for controlling NetworkManager and reporting network status. It can be utilized as a replacement for nm-applet or other graphical clients. nmcli is used to create, display, edit, delete, activate, and deactivate network connections, as well as control and display network device status.
Ask networkmanager about online status¶
Get General status¶
Listing NetworkManager polkit permissions¶
Print info line by line¶
List all the available device¶
Show info about connections¶
Import wireguard config to nmcli¶
Show devices¶
Show the Network Manager status of all network interfaces¶
List all connection¶
List the current settings for the connection name¶
Check if NetworkManager is running¶
List all the configuration of interface¶
Change hostname using nmcli¶
Delete setup¶
Delete Setup¶
Reload connection using nmcli (restart)¶
Set Wifi down¶
Set Wifi up¶
Set Modem down¶
Set Modem up¶
Set Ethernet down¶
Set Ethernet up¶
Listing available Wi-Fi APs¶
Connect to a password-protected wifi network¶
Connect to a password-protected wifi network and get asked for password¶
Showing general information and properties for a Wi-Fi interface¶
Add wifi-hotspot helpo¶
Create wifi-hotspot¶
nmcli dev \
wifi hotspot \
ifname wlp2s0 \
con-name wuseman \
ssid SSID-wuseman \
password "SSID-wuseman-password"