diff --git a/pages/linux/nmcli-connection.md b/pages/linux/nmcli-connection.md new file mode 100644 index 000000000..d7d76b134 --- /dev/null +++ b/pages/linux/nmcli-connection.md @@ -0,0 +1,27 @@ +# nmcli connection + +> Connection management with NetworkManager. + +- List all NetworkManager connections (shows name, uuid, type and device): + +`nmcli connection` + +- Activate a connection by specifying an uuid: + +`nmcli connection up uuid {{uuid}}` + +- Deactivate a connection: + +`nmcli connection down uuid {{uuid}}` + +- Create an auto-configured dual stack connection: + +`nmcli connection add ifname {{interface_name}} type {{ethernet}} ipv4.method {{auto}} ipv6.method {{auto}}` + +- Create a static IPv6-only connection: + +`nmcli connection add ifname {{interface_name}} type {{ethernet}} ip6 {{2001:db8::2/64}} gw6 {{2001:db8::1}} ipv6.dns {{2001:db8::1}} ipv4.method {{ignore}}` + +- Create a static IPv4-only connection: + +`nmcli connection add ifname {{interface_name}} type {{ethernet}} ip4 {{10.0.0.7/8}} gw4 {{10.0.0.1}} ipv4.dns {{10.0.0.1}} ipv6.method {{ignore}}` diff --git a/pages/linux/nmcli-device.md b/pages/linux/nmcli-device.md new file mode 100644 index 000000000..50f6fd9a0 --- /dev/null +++ b/pages/linux/nmcli-device.md @@ -0,0 +1,15 @@ +# nmcli device + +> Hardware device management with NetworkManager. + +- Print the statuses of all network interfaces: + +`nmcli device status` + +- Print the available Wi-Fi access points: + +`nmcli device wifi` + +- Connect to the Wi-Fi network with a specified name and password: + +`nmcli device wifi connect {{ssid}} password {{password}}` diff --git a/pages/linux/nmcli.md b/pages/linux/nmcli.md index 79a00ca2f..c9e0c66dd 100644 --- a/pages/linux/nmcli.md +++ b/pages/linux/nmcli.md @@ -2,26 +2,18 @@ > A command line tool for controlling NetworkManager. -- List all NetworkManager connections (shows name, uuid, type and device): +- Check the nmcli version: -`nmcli connection` +`nmcli --version` -- Print the available Wi-Fi access points: +- Call general help: -`nmcli device wifi` +`nmcli --help` -- Connect to the Wi-Fi network with a specified name and password: +- Call help on a command: -`nmcli device wifi connect {{name}} password {{password}}` +`nmcli {{command}} --help` -- Activate a connection by specifying an uuid: +- Execute an `nmcli` command: -`nmcli connection up uuid {{uuid}}` - -- Deactivate a connection: - -`nmcli connection down uuid {{uuid}}` - -- Print statuses of network interfaces: - -`nmcli device status` +`nmcli {{command}}`