Ubuntu Chroot Setup Notes

I use debootstrap and this helper script.

Bootstrap:

sudo apt-get install debootstrap
sudo debootstrap trusty ${CHROOT} http://archive.ubuntu.com/ubuntu/

Basic setup inside chroot as root:

apt-get install locales dialog
locale-gen en_US.UTF-8

vi /etc/hosts  # Add a line like "127.0.1.1 your_hostname"

useradd -m clchiou --shell /bin/bash  # Default is /bin/sh
usermod -aG sudo clchiou
passwd clchiou
Creative Commons License
This blog by Che-Liang Chiou is licensed under a Creative Commons Attribution 4.0 International License.