This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
NetworkManager nmcli
¶
A network management software for Ethernet, WiFi, DSL, VPN, etc, and mobile broadband network
connections. NetworkManager is a program for providing detection and configuration for systems to
automatically connect to networks (wired and wireless). nmcli
is it's official command line
interface, about which we will focus here.
Tip
If you don't want to use a CLI tool, then choose a GUI one: a lot of GUI front-ends are
available](https://wiki.archlinux.org/title/NetworkManager#Front-ends). In addition,
nmtui
is very nice and simple TUI alternative.
Reference(s)
Table of contents¶
Install¶
Config¶
Now, add NetworkManager
to your init manager:
Depending on your runit
implementation, either run:
Use¶
Status¶
-
Get NetworkManager global status:
-
Print whether NetworkManager is running or not:
-
Print whether NetworkManager general state:
-
Show all configured connections (active connections are green and inactive ones are white):
-
Show all configured connections in multi line mode:
-
List all currently active connections:
-
Show static configuration details of a specific connection:
Connection¶
-
Activate a specific connection:
-
Activate a specific connection showing the progress of the activation:
-
Activate a specific connection with interactive password:
-
Deactivate a specific connection:
-
Show details for a specific connection:
Wi-Fi¶
-
Switch Wi-Fi off and on:
-
List available Wi-Fi:
-
Connect to a password protected Wi-Fi network:
-
Connect to a password protected Wi-Fi network interactively:
After your first connection, the password used will be saved, so the next time you can just run:
nmcli con up "SSID or BSSID"
.
-
shows details for "SSID or BSSID" connection profile with all passwords:
-
Showing general information and properties for a Wi-Fi interface (e.g.
wlan0
): -
Create a hotspot profile and connects it (also print the hotspot password the user should use to connect to the hotspot from other devices) WIP:
Editor¶
WIP
-
Edit existing "SSID or BSSID" connection in the interactive editor:
-
Add a new Ethernet connection in the interactive editor:
TODO
MAC address¶
Reference(s)
Change the MAC address of an interface (e.g. interface enp1s0
with the new MAC address
00:12:34:56:78:9a
):
If this cheat sheet has been useful to you, then please consider leaving a star here.