engram-boot/docs/network.md

62 lines
1.8 KiB
Markdown

# Network
Day-to-day network management on Arch, all through **NetworkManager** — one
tool for ethernet, WiFi, DHCP and VPN. If you ever forget the commands,
`nmtui` gives you a text UI for the same thing.
## Status
```shell
nmcli device status # interfaces and what they are doing
nmcli general status # overall NM state + connectivity check
nmcli connection show # saved connections
ip -brief address # IP addresses (iproute2, part of base)
```
## Ethernet
Wired connections are picked up automatically (DHCP). If a cable is connected
but the interface stays disconnected:
```shell
nmcli device connect eno1
```
## WiFi
```shell
nmcli radio wifi # is the WiFi radio on?
nmcli radio wifi on # turn it on if needed
nmcli device wifi list # visible networks (--rescan yes to refresh)
nmcli device wifi connect "MyNet" --ask # connect, ask for password
nmcli device wifi connect "MyNet" password "secret" # or inline
nmcli device wifi connect "MyNet" hidden yes # hidden network
```
Managing the connection afterwards:
```shell
nmcli connection show # saved connections
nmcli connection up "MyNet" # connect again
nmcli device disconnect wlan0 # disconnect
nmcli connection delete "MyNet" # forget it
```
NetworkManager remembers networks and reconnects to them automatically.
## Checking what I have
```shell
nmcli device show wlan0 # details for one interface (IP, gateway, DNS)
nmcli -f IP4.ADDRESS,IP4.GATEWAY,IP4.DNS device show
ping archlinux.org # is it actually working?
```
## Tips
- `nmtui` — full text UI when you don't remember the nmcli syntax.
- Interface names: `eno1` (ethernet), `wlan0` (WiFi) — check `nmcli device status`.
- The WiFi backend is `wpa_supplicant`, managed by NetworkManager — it is
never started or configured separately.