Add Arch Linux Container
Last Update: 2023-10-17
Prerequisites
- Enable the Linux subsystem.
- Ensure a stable internet connection.
Creating the Container
-
Press
Control + Alt + T
to open the Crosh terminal. -
Enter
vsh termina
to access Vsh Termina. -
Execute the following command to create an Arch container:
Terminal window lxc launch images:archlinux/current archlinux -
After installation, enter the following command to access the container:
Terminal window lxc exec archlinux -- bash
Configuring the Container
-
Type
passwd
to set the root password. -
Install necessary packages:
Terminal window yes y | pacman -Syu base-devel git gtk3 openssh xdg-utils xkeyboard-config base-devel git curl make neovim wl-clipboard fish base-devel fakeroot pacman-contrib wayland xorg-xwayland devtools dhclient neofetch sudo -
Add a username and set a password:
Terminal window sudo useradd -G wheel -m demosudo passwd demodemo
is the default username. Please replace it as needed. -
To disable the sudo password, run:
Terminal window sudo sed -i 's/^# \(%wheel ALL=(ALL:ALL) ALL\)/\1/; s/^# \(%wheel ALL=(ALL:ALL) NOPASSWD: ALL\)/\1/' /etc/sudoers -
Type
exit
to leave the arch container. -
Re-enter the terminal using:
Terminal window lxc exec archlinux su - demo -
Install
cros-container-guest-tools-git
:Terminal window git clone https://aur.archlinux.org/yay.gitcd yayyes y | makepkg -siyay -S cros-container-guest-tools-gitexit
Adding ArchLinux in the Terminal
-
Open the Chromium browser and enter
chrome://flags
. Find and enable the#crostini-multi-container
Flag. -
In “Settings”, click on “Developers”, then “Manage Extra Containers”. Enter the container name and click “Create”.
-
Set the container name to
archlinux
and click “Create”. -
Restart FydeOS.
Checking the Network
-
Check the network configuration by entering:
Terminal window ip -4 a show dev eth0 -
If there’s no response, execute:
Terminal window sudo dhcpcd eth0sudo pacman -S dhclientsudo systemctl disable systemd-networkdsudo systemctl disable systemd-resolvedsudo unlink /etc/resolv.confsudo touch /etc/resolv.confsudo systemctl enable dhclient@eth0sudo systemctl start dhclient@eth0
Optionally Replace the Default Penguin Container with Arch
-
Launch Crosh and enter:
Terminal window vsh termina -
Execute the following to replace the container:
Terminal window lxc stop archlinuxlxc stop penguinlxc rename penguin debianlxc rename arch penguinlxc stop --force archlinux