$ curl cheat.sh/
 cheat:nmcli 
---
tags: [ networking ]
---
# Connect to a wireless access point - Parameters:
# 	<wiface> -- the name of your wireless interface
#	<ssid> -- the SSID of the access point
#	<pass> -- the WiFi password
nmcli d wifi connect <ssid> password <pass> iface <wiface>

# Disconnect from WiFi - Parameters:
#	<wiface> -- the name of your wireless interface
nmcli d wifi disconnect iface <wiface>

# Get WiFi status (enabled / disabled)
nmcli radio wifi

# Enable / Disable WiFi
nmcli radio wifi <on|off>

# Show all available WiFi access points
nmcli dev wifi list

# Refresh the available WiFi connection list
nmcli dev wifi rescan

# Show all available connections
nmcli con

# Show only active connections
nmcli con show --active

# Review the available devices
nmcli dev status

# Add a dynamic ethernet connection - parameters:
#	<name> -- the name of the connection
#	<iface_name> -- the name of the interface
nmcli con add type ethernet con-name <name> ifname <iface_name>

# Import OpenVPN connection settings from file:
nmcli con import type openvpn file <path_to_ovpn_file>

# Bring up the ethernet connection
nmcli con up <name>

# Show WiFi password and QR code
nmcli dev wifi show

 tldr:nmcli 
# nmcli
# A command-line tool for controlling NetworkManager.
# Some subcommands such as `nmcli monitor` have their own usage documentation.
# More information: <https://networkmanager.dev/docs/api/latest/nmcli.html>.

# Run an `nmcli` subcommand:
nmcli agent|connection|device|general|help|monitor|networking|radio command_options

# Display the current version of NetworkManager:
nmcli --version

# Display help:
nmcli --help

# Display help for a subcommand:
nmcli subcommand --help

$
Follow @igor_chubin cheat.sh