nmcli: add more server examples (#3816)

This commit is contained in:
Lukáš Zapletal
2020-03-06 18:10:05 +01:00
committed by GitHub
parent 2f24ed9b74
commit e54c562361
3 changed files with 50 additions and 16 deletions

View File

@@ -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}}`

View File

@@ -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}}`

View File

@@ -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}}`