Arch Post-Install Notes

Arch Post-Install Notes

Setup DHCP with networkd

First we use networkctl list, ls /sys/class/net or ip link to get the names of the the network interfaces. We then setup files for the wired and wireless interfaces.

#/etc/systemd/network/wired.network
[Match]
Name=eth0

[Network]
DHCP=yes

[DHCP]
RouteMetric=10
#/etc/systemd/network/wireless.network
[Match]
Name=wlan0

[Network]
DHCP=yes

[DHCP]
RouteMetric=20

Networkd can then be enabled, the `--now┬┤ flag enables the service right away.

systemctl enable --now systemd-resolved.service
systemctl enable --now systemd-networkd.service

If configuration files are changed, the service has to be restarted.

systemctl restart systemd-networkd.service

The wireless interface needs to be connected to work, see below.

Connect wireless adapter with iwd

Make sure that iwd is installed, then enable and start the deamon.

systemctl enable --now iwd.service

Then start the interactive promt.

iwctl

List wireless devices

[iwd]# device list

Scan for wireless networks, replace device with with the name of a wireless device.

[iwd]# station device scan

List wireless avaliable wireless networks

[iwd]# station device get-networks

Connect to wireless network

[iwd]# station device connect SSID

Show device information, replace second device with interface name.

[iwd]# device device show

Disconnect wireless adapter

[iwd]# station device disconnect

Forget wireless network

[iwd]# known-networts forget SSID

https://wiki.archlinux.org/index.php/Systemd-networkd
https://www.redpill-linpro.com/techblog/2016/08/17/systemd-network.html
https://wiki.archlinux.org/index.php/Iwd

Setup mirrors

Backup the mirror-list.

cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak

Save local mirrors, in my case Sweden.

awk '/^## Sweden$/{f=1}f==0{next}/^$/{exit}{print substr($0, 2)}' /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrorlist.sweden

Optional: Rank mirros and replace mirrorlist. Requires rankmirroes script that first has to be downloaded.

rankmirrors /etc/pacman.d/mirrorlist.sweden >> /etc/pacman.d/mirrorlist

Upgrade the system

Use pacman -Syu to not perform a partial upgrade.

Create user

Install Sudoers if not already installed with base-devel.

pacman -S sudo

Uncomment the wheel-group.

visudo /etc/sudoers

Create user and set passwd.

useradd -m -g users -G wheel user_name
passwd user_name

Previous Post Next Post