SETUP-INTERFACES(8)
π SETUP-INTERFACES(8) β the Alpine Linux network glow-up guide β¨
okay bestie, so this is a page from the System Manager's Manual, and it's literally all about setup-interfaces. buckle up π
πΈ NAME πΈ
setup-interfaces β configure Alpine Linux network interfaces
π¦ SYNOPSIS π¦
setup-interfaces [-abhir] [-p ROOT] [-w FILE]
β¨ DESCRIPTION β¨
So setup-interfaces configures network interfaces for Alpine Linux. it's giving guided tour energy π« β it runs an interactive walk-through that sniffs out unconfigured interfaces and then prompts you for addressing, bridges, bonding, VLANs, and wireless credentials.
It writes the network configuration under the target root, and if you want, it also sets up wpa_supplicant(8) for wireless networks. π«Ά
and like, quick little flex: when you run it in a Xen Dom0, bridging is offered by default. no cap. π
π OPTIONS π
-aβ set up the first available interface with DHCP and dip out, no prompts shown. all available interfaces get brought up and polled simultaneously; the first one whose link state becomes"up"(within a total timeout of roughly 1.1 seconds) gets configured, and the rest are taken down. bye besties π-bβ prompts for bridging of each interface during interactive setup. enabled by default in Xen Dom0.-hβ display usage information and exit. classic.-iβ read new contents of/etc/network/interfacesfrom stdin and write them to the file. no interactive prompts, none, zero. when combined with-a,-itakes precedence (it said what it said πββοΈ).-pROOT β operate on the system tree at ROOT instead of"/". network and imported wireless configuration are written under ROOT.-rβ restart the networking service after configuration. refresh era π-wFILE β import FILE as/etc/wpa_supplicant/wpa_supplicant.confand enable thewpa_supplicantservice at boot. can be combined with other modes to set up wireless credentials alongside the interface configuration. multitasking icon π
π INTERACTIVE MODE π
When invoked without -a or -i, setup-interfaces enters interactive mode. this is the main character era of the script π
π§ Interface selection
The script scans for unconfigured interfaces β that's physical network devices that aren't already set up in /etc/network/interfaces. note that loopback and docker0 are skipped (docker0 we love you but not today π).
For each detected interface, you get prompted to assign it an address, add it to a bridge or bond, or mark it as a VLAN raw device.
The following interface types can be entered at the prompt:
br[0-9]+(e.g.br0) β bridge interface. the script prompts for which unconfigured physical ports to add as bridge ports. πbridge[0-9]+(e.g.bridge0) β synonym for a bridge interface. same vibe, different name.virbr[0-9]+(e.g.virbr0) β bridge interface.bond[0-9]+(e.g.bond32) β bonded (aggregated) interface. the script prompts for which unconfigured physical interfaces to add as bond slaves. squad goals fr fr π«bond[0-9]+.[0-9]+(e.g.bond0.371) β VLAN on top of a bonded interface. layers, literally.vlan[0-9]+(e.g.vlan371) β VLAN interface. the script prompts for the raw device.IFACE.[0-9]+(e.g.eth0.371) β VLAN on a physical interface.
β Addressing
For each interface, these address types are supported:
dhcpβ configure the interface with DHCP. easy mode, we stan.staticβ enter a static IPv4 address. a prompt for netmask (default255.255.255.0) and gateway (default none) follows. you got this πͺnoneβ do not assign an address. an"up"entry is written to the config so the interface is brought up at boot.
ok so tiny detail that's lowkey iconic: when a static address is entered with a/masksuffix (e.g.192.168.1.1/24), the netmask is extracted automatically and the netmask prompt is skipped. the script ate that one π₯
π©΅ Wireless
If the interface is a wireless device (it has a phy80211 directory under /sys/class/net/), the script scans for visible access points and prompts for the SSID. for WPA-PSK networks, a password is prompted. the configuration gets written via wpa_passphrase(8) to /etc/wpa_supplicant/wpa_supplicant.conf, and the wpa_supplicant service is enabled and started. π¦πΆ
the iw and wpa_supplicant packages are installed on demand β no need to pre-install, it'll just handle it.
π Bridge, bond, and VLAN details
Bridges and bonds collect ports from the pool of unconfigured physical interfaces. once a port is assigned to a bridge or bond, it's removed from the unconfigured pool and is not prompted for individually. teamwork makes the dream work π
VLAN interfaces (e.g. eth0.371) require a raw device; that raw device must itself be unconfigured or a bond master. important detail, don't skip it β¨
π Final steps
After all interfaces are configured, you get an opportunity to edit the generated configuration manually. if packages for bridging (bridge), bonding (bonding), or VLANs (vlan) are needed, they're installed. then the configuration is copied to /etc/network/interfaces. and that's the whole glow-up, periodt. π
π EXIT STATUS π
0β success. slay.- non-zero β an error occurred. π (it happens to the best of us)
π₯ ENVIRONMENT π₯
SETUP_INTERFACES_LINK_WAIT_MAXβ maximum number of retries (at 0.1-second intervals) when waiting for a link to come up in-amode. defaults to11(approximately 1.1 seconds total). tune it if you're feeling spicy πΆοΈ
π FILES π
/etc/network/interfacesβ the generated network interface configuration file. the main event π/etc/wpa_supplicant/wpa_supplicant.confβwpa_supplicantconfiguration written when wireless networks are configured. π‘
π« SEE ALSO π«
wpa_supplicant(8), wpa_passphrase(8), setup-alpine(8), setup-disk(8)
iykyk β go read those next, bestie π«Ά
π AUTHORS π
Natanael Copa <ncopa@alpinelinux.org> and others π«‘
so yeah, that's the whole page β brought to you by Alpine Linux, dated 2026-06-09, version-locked and iconic. now go configure something and make it cute π β¨π
π¦ where this page comes from
- alpine 3.24: alpine-conf-doc 3.22.0-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms