Size: 2442
Comment:
|
← Revision 6 as of 2023-06-22 20:37:03 ⇥
Size: 2979
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
'''NetworkManager''' is a high level network administration tool. | '''`NetworkManager(8)`''' is a high level network administration tool. |
Line 13: | Line 13: |
Most [[Linux]] distributions offer a `networkmanager` package. |
|
Line 19: | Line 21: |
'''`nmcli(1)`''' and '''`nmtui(1)`''' are bundled with NetworkManager. | '''`nmcli(1)`''' and '''`nmtui(1)`''' are bundled with `NetworkManager(8)`. |
Line 21: | Line 23: |
NetworkManager stores profiles of '''connections'''. These are then written to files in `/etc/NetworkManager/system-connections/`. | `NetworkManager(8)` stores profiles of '''connections'''. These are then written to files in `/etc/NetworkManager/system-connections/`. |
Line 86: | Line 88: |
NetworkManager uses an internal [[Protocols/DHCP|DHCP]] client. To use a different client, edit `/etc/NetworkManager/conf.d/dhcp-client.conf` like: | `NetworkManager(8)` uses an internal [[Protocols/DHCP|DHCP]] client. To use a different client, edit `/etc/NetworkManager/conf.d/dhcp-client.conf` like: |
Line 93: | Line 95: |
Only [[Dhclient|dhclient]] and [[Dhcpcd|dhcpcd]] are allowed alternatives. | Only [[Dhclient|dhclient(8)]] and [[Dhcpcd|dhcpcd(8)]] are allowed alternatives. |
Line 95: | Line 97: |
NetworkManager broadcasts a machine's hostname. To disable this on a per-connection basis, edit `/etc/NetworkManager/system-connections/CONNECTION_UUID` like: | `NetworkManager(8)` broadcasts a machine's hostname. To disable this on a per-connection basis, edit `/etc/NetworkManager/system-connections/CONNECTION_UUID` like: |
Line 109: | Line 111: |
NetworkManager tries to take ownership of [[Protocols/DNS|DNS]] through the [[Linux/resolv.conf|resolver file]], `/etc/resolv.conf`. If another service tries to do the same, DNS can end up mangled. | `NetworkManager(8)` tries to take ownership of [[Protocols/DNS|DNS]] through the [[Linux/ResolvConf|resolver file]], `/etc/resolv.conf`. If another service tries to do the same, DNS can end up mangled. |
Line 118: | Line 120: |
Only [[Dnsmasq|dnsmasq]] and [[Linux/SystemdResolved|systemd-resolved]] are allowed alternatives. | Only [[Dnsmasq|dnsmasq(8)]] and [[Linux/SystemdResolved|systemd-resolved(8)]] are allowed alternatives. As a workaround for compatibility with [[OpenResolv|openresolv]], edit `/etc/NetworkManager/conf.d/rc-manager.conf` like: {{{ [main] rc-manager=resolvconf }}} It is also possible to disable DNS operations entirely by setting `dns=none`. |
Line 122: | Line 133: |
== Wi-Fi Backend === | === Wi-Fi Backend === |
Line 131: | Line 142: |
---- == See also == [[https://man.archlinux.org/man/extra/networkmanager/NetworkManager.8.en|NetworkManager(8)]] [[https://man.archlinux.org/man/nmcli.1|nmcli(1)]] |
NetworkManager
NetworkManager(8) is a high level network administration tool.
Contents
Installation
Most Linux distributions offer a networkmanager package.
Usage
nmcli(1) and nmtui(1) are bundled with NetworkManager(8).
NetworkManager(8) stores profiles of connections. These are then written to files in /etc/NetworkManager/system-connections/.
To list all connections, try:
nmcli connection show
To set a connection up or down, try:
nmcli connection up CONNECTION_UUID nmcli connection down CONNECTION_UUID
To delete a connection (and erase the locally stored profile), try:
nmcli connection delete CONNECTION_UUID # or rm /etc/NetworkManager/system-connections/CONNECTION_UUID
WiFi
To list available Wi-Fi networks, try:
nmcli device wifi list
To connect to a new Wi-Fi network, thereby creating a connection, try:
nmcli device wifi connect NETWORK_SSID password NETWORK_PASSWORD
To turn off Wi-Fi entirely, try:
nmcli radio wifi off
Network Interfaces
To disconnect a network interface (like eth0), try:
nmcli device disconnect ifname IFNAME
Configurations
DHCP
NetworkManager(8) uses an internal DHCP client. To use a different client, edit /etc/NetworkManager/conf.d/dhcp-client.conf like:
[main] dhcp=dhclient
Only dhclient(8) and dhcpcd(8) are allowed alternatives.
NetworkManager(8) broadcasts a machine's hostname. To disable this on a per-connection basis, edit /etc/NetworkManager/system-connections/CONNECTION_UUID like:
[ipv4] dhcp-send-hostname=false [ipv6] dhcp-send-hostname=false
DNS
NetworkManager(8) tries to take ownership of DNS through the resolver file, /etc/resolv.conf. If another service tries to do the same, DNS can end up mangled.
To use a different client, edit /etc/NetworkManager/conf.d/dns.conf like:
[main] dns=dnsmasq
Only dnsmasq(8) and systemd-resolved(8) are allowed alternatives.
As a workaround for compatibility with openresolv, edit /etc/NetworkManager/conf.d/rc-manager.conf like:
[main] rc-manager=resolvconf
It is also possible to disable DNS operations entirely by setting dns=none.
Wi-Fi Backend
To use iwd(8) as the Wi-Fi backend, edit /etc/NetworkManager/conf.d/wifi_backend.conf like:
[device] wifi.backend=iwd