diff --git a/labs/a3.md b/labs/a3.md index c0981ea4..6e45b1ee 100644 --- a/labs/a3.md +++ b/labs/a3.md @@ -621,6 +621,30 @@ Use `passwd` to set the root password to `itoolovelinux`. > computer. +### Network Configuration + +There are many ways to manage network connections and interfaces in Linux, in our case we will be using systemd-networkd as our configuration needs are relatively simple. + +First we enable systemd-networkd +```sh +systemctl enable systemd-networkd.service +systemctl enable systemd-resolved.service +``` + +Create config file +```sh +nano /etc/systemd/network/wired.network +``` +Add the following contents to it +```sh +[Match] +Name=ens2 + +[Network] +DHCP=yes +``` + + ### Boot loader Historically, GRUB has been the only reasonable choice of boot loader. However, @@ -689,14 +713,13 @@ password you set! **GRADESCOPE**: To show off your newly installed Arch system, run the following commands and paste the output into Gradescope: ``` -hostname -f +hostnamectl ip addr mount lsblk uname -a ``` -**Debugging Note:** If the `hostname` command is not found, you may need to install it by running `sudo pacman -S inetutils`. Doing so may also reveal that your internet connection is not yet configured. If this is the case, then you will likely need to `sudo systemctl enable systemd-resolved` and/or `sudo systemctl enable systemd-networkd` and/or `sudo systemctl enable dhcpcd` and/or `ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf `. You can see more information about this in the ArchWiki: https://wiki.archlinux.org/index.php/systemd-networkd. If these instructions do not work, you may also need to [reboot into the Arch installer](https://mycfg.net/articles/booting-from-a-cdrom-in-a-kvm-guest-using-libvirt/) and [use pacstrap to install dhcpcd](https://unix.stackexchange.com/questions/259938/how-to-reinstall-dhcpcd-without-internet-connection/260017). When you are done, you can hit `ctrl-]` to detach your console from the Arch VM and get back to your normal student VM shell.