Before rebooting an Arch install

Installing GRUB bootloader

pacman -S grub
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

After a fresh install

Make sure to have a normal user

chsh -l
useradd -m -G wheel -s <shell_path> <username>
passwd <username>
who

On Arch, chsh is provided by util-linux rather than shadow-utils, and its -l, --list-shells option prints the content of /etc/shells/.

Modify the sudoers file

  • Pass editor path to visudo
  • EDITOR=/usr/bin/vim visudo # Set environment variable to define a text editor to use with this specific visudo instance. Important since visudo falls back to vi and Arch doesn't include it in a minimal install.

    Uncomment the %wheel ALL=(ALL:ALL) ALL line to allow members of this group to execute any command as any user. Visudo validates syntax before saving, sudo access can't be lost due to a misconfigured sudoers file.

    Connect to internet

    Configure ethernet interface

  • Symlink example configuration files
  • Bring the interface up
  • ln -s /usr/lib/systemd/network/89-ethernet.network.example /etc/systemd/network/89-ethernet.network
    ip link show
    ip link set <interface_name> up

    Network configuration files are loaded from various directories in the system at boot, according to the following lookup chain.
    /usr/lib/systemd/network/ /usr/local/lib/systemd/network/ system network directories.
    /run/systemd/network/ volatile runtime network directory
    /etc/systemd/network/ local administration network directory, which holds the highest precedence.

    I still have nothing more than a loopback address, even though the interface is UP.

    Remember, DHCP request won't trigger on its own. Without daemons, nobody ask...

    What do you mean? DHCP is configured... Is it that I need to enable the network service for it all to work?

    Enable network services

  • Enable networkd and resolved
  • Symlink resolved configuration file
  • systemctl enable --now systemd-networkd
    systemctl enable --now systemd-resolved
    ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
    ip a show <interface_name> # Confirm that IP address has been attributed

    Switch to NetworkManager

  • Disable currently used network services
  • Delete unused configuration file
  • Enable NetworkManager
  • systemctl disable --now systemd-networkd
    systemctl disable --now systemd-resolved
    rm /etc/resolv.conf
    systemctl enable --now NetworkManager

    Setting up SSH

  • Install SSH networking utility
  • Enable SSH service
  • pacman -S openssh
    systemctl enable --now sshd

    Enabling sshd create a symlink from /etc/systemd/system/multi-user.target.wants/sshd.service to /usr/lib/systemd/system/sshd.service. SSH requires no additional network configuration beyond the example file already configured for ethernet.