Update cheatsheets

This commit is contained in:
ivuorinen
2025-07-20 00:24:01 +00:00
parent 16134c78d9
commit 1ec3810968
41 changed files with 352 additions and 139 deletions

View File

@@ -6,33 +6,32 @@ source: https://github.com/tldr-pages/tldr.git
# nmcli connection
> Manage connections with NetworkManager.
> This subcommand can also be called with `nmcli c`.
> More information: <https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/nmcli.html>.
- List all NetworkManager connections (shows name, UUID, type and device):
`nmcli connection`
`nmcli {{[c|connection]}}`
- Activate a connection:
`nmcli connection up uuid {{uuid}}`
`nmcli {{[c|connection]}} {{[u|up]}} {{uuid}}`
- Deactivate a connection:
`nmcli connection down uuid {{uuid}}`
`nmcli {{[c|connection]}} {{[d|down]}} {{uuid}}`
- Create an auto-configured dual stack connection:
`nmcli connection add ifname {{interface_name}} type {{ethernet}} ipv4.method {{auto}} ipv6.method {{auto}}`
`nmcli {{[c|connection]}} {{[a|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}}`
`nmcli {{[c|connection]}} {{[a|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}}`
`nmcli {{[c|connection]}} {{[a|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}}`
- Create a VPN connection using OpenVPN from an OVPN file:
`nmcli connection import type {{openvpn}} file {{path/to/vpn_config.ovpn}}`
`nmcli {{[c|connection]}} {{[i|import]}} type {{openvpn}} file {{path/to/vpn_config.ovpn}}`