Network configuration
Network configuration
MocaccinoOS uses Network Manager to manage network connections by default. It handles wired and wireless connections automatically and can be controlled via the nmcli command line tool, a graphical applet in your desktop environment, or the nmtui text interface.
For users who prefer a more minimal setup, systemd-networkd is also available as an alternative.
Network Manager
Checking status
To verify Network Manager is running and connected:
|
|
To list all network interfaces and their state:
|
|
To list all configured connection profiles:
|
|
Wi-Fi
Scan for available networks:
|
|
Connect to a network:
|
|
Disconnect from Wi-Fi:
|
|
To enable or disable Wi-Fi:
|
|
Wired (Ethernet)
Wired connections are configured automatically via DHCP when a cable is plugged in. If you need to set a static IP address on a connection, see the Static IP section below.
To bring a wired connection up or down manually:
|
|
Static IP
To assign a static IP address to an existing connection:
|
|
Then bring the connection back up to apply the changes:
|
|
To revert back to DHCP:
|
|
nmtui
If you prefer a simple text-based interface over the command line, Network Manager includes nmtui. Launch it with:
|
|
This opens a menu-driven interface where you can add, edit, and activate connections without needing to remember nmcli syntax.
systemd-networkd
If you prefer to use systemd-networkd instead of Network Manager, follow the steps below.
1. Switch services
Disable Network Manager and enable systemd-networkd:
|
|
Then enable systemd-resolved for DNS resolution:
|
|
2. Find your interface name
Run networkctl to list available network interfaces:
|
|
Example output:
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 enp3s0 ether routable configured
3 enp2s0 ether off unmanaged
Note the name of the interface you want to configure (e.g. enp3s0).
3. Configure your interface
Create a configuration file for your interface:
|
|
Static IP:
|
|
DHCP:
|
|
After saving the file, restart the service to apply your changes:
|
|