Crostini is the technology used by Google to make Linux application support easy to use and integrate well with Chrome OS. The goal of this guide use the Chrome OS Terminal with Arch Linux distros alongside the default penguin (stripped-down) Debian container, in seven simple steps!

1 - Open the crosh shell and start termina

ctrl-alt-t

Start the Linux VM (“termina”). From this VM, we will create an LXC container from the Arch Linux image:

vmc start termina

image

2 - Create the LXC container with Arch Linux

lxc launch images:archlinux/current arch

image

Stop the default container:

lxc stop penguin

Check if penguin is stopped and arch is running:

lxc list

image

3 - Set up the user

Enter the container:

lxc exec arch bash

Create the default user. I name mine “andrea”:

useradd -m andrea

Change the password:

passwd andrea

Give sudo rights to user:

visudo # uncommented %wheel ALL=(ALL:ALL) NOPASSWD: ALL

usermod -aG wheel andrea

4 - Set up networking

ip -4 a show dev eth0

pacman -Syu dhclient

systemctl enable --now dhclient@eth0

image

5 - Install some packages

Log in as user:

exit

lxc exec arch su - andrea

sudo pacman -Syu base-devel git curl make vim wl-clipboard zsh

Install the AUR helper yay:

git clone https://aur.archlinux.org/yay.git

cd yay

makepkg -si

image

6 - Install cros-container-guest-tools

This tool allows X apps to work. It can be installed using yay:

yay -S cros-container-guest-tools-git

cp -r /etc/skel/.config/pulse ~/.config/pulse

Installl a tool to test X/Wayland:

yay -S xorg-xwayland wayland mousepad

exit

lxc console arch # login with user

systemctl enable --now --user sommelier{,-x}@{0,1}.service

Test X:

mousepad # window opened as expected

image

Everything seems to work perfectly, so…

7 - Set Arch as default container

<ctrl>+a q

lxc list # arch and penguin show up

lxc stop arch

lxc rename penguin google

lxc rename arch penguin

lxc list

image

exit

vmc list

vmc stop termina

image

Now, exit crosh and start the Linux console:

image