Most of these instructions are modified from :
Install Kali Container
Open Crosh (Ctrl+Alt+T), and then run the following command to install the Kali container through LXD. You might get an error here, ignore it:
vmc container termina kali https://us.images.linuxcontainers.org kali
Now enter the kali container:
vsh termina
lxc exec kali -- bash
Install sudo
:
apt install sudo
Find the non-root user that was created (your username):
grep 1000:1000 /etc/passwd|cut -d':' -f1
Give this user a password and sudo permissions:
passwd <username>
usermod -aG sudo <username>
Switch to the non-root user:
su - <username>
Make sure you have network connection. You should see a non-empty result:
ip -4 a show dev eth0
If you see an empty result, I'm honestly not sure what to do. Consult other articles!
Integration with Chrome OS
I installed a couple packages that were recommended in other articles, but I am not sure if it was necessary:
sudo apt install -y gnupg2 psmisc
Add Google's cros-package
repo. Start by switching into root user so that sudo echo
works:
sudo -i
sudo apt install ca-certificates
sudo echo "deb https://storage.googleapis.com/cros-packages stretch main" > /etc/apt/sources.list.d/cros.list
if [ -f /dev/.cros_milestone ]; then sudo sed -i "s?packages?packages/$(cat /dev/.cros_milestone)?" /etc/apt/sources.list.d/cros.list; fi
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1397BC53640DB551
exit # to get back to non-root user
Then update:
sudo apt-get update
Finally, install cros-guest-tools
to enable integration with Chrome OS:
sudo apt install cros-guest-tools
Enable graphical integration:
systemctl --user enable --now sommelier@0 sommelier-x@0 sommelier@1 sommelier-x@1
Allow apps to run in the background:
loginctl enable-linger <username>
Before I could get GUI apps to run (e.g. gnome-terminal
) I had to exit the container and re-enter:
exit # until you are back to Termina
lxc exec kali -- bash
su - <username>
I installed gnome-terminal to test a gui program, but hopefully others will work as well!