Setting Up Linux Environment¶
You will need a Linux machine or VM where you have root access via sudo in order to complete these lessons.
They are impossible to do on Windows or Mac OS without a Linux Virtual Machine (VM).
You can either run a VM locally on your machine if it isn’t Linux or a VM in a cloud setup.
It is possible your instructor might be providing such VMs in bulk.
Attention
You must have a working Linux setup (machine or VM) where you have root access via sudo and the required additional software by the beginning of the actual course.
If you do not, you WILL BE LEFT BEHIND!
Installing the Required Software¶
You need to check if you have the following programs available on the command line
Specific programs
busyboxchrootfindmntnewgidmapnewuidmapnsenterpivot_rootunshareuseradduserdelusermod
Generic programs
Your preferred POSIX shell (e.g.
bash,zsh, etc.)Your preferred plain-text editor (e.g.
nano,vim,emacs, etc.)
If any are missing, you will need to install the packages that have them.
If you are missing busybox, you will need to install the package busybox on your distro or you can just download a compiled binary for your system from the BusyBox website.
If you are missing chroot, you will need to install coreutils or core-utils for your linux distro (how it is even running without this is a mystery).
If you are missing nsenter, pivot_root, and unshare; you need to install util-linux or util-linux-core for your Linux distro (can try one and do the other if it doesn’t work).
If you are missing the rest, you will need to install shadow-utils.
Depending on your distro, it is possible the right packages might have a bit different names.
If you search for shadow and util-linux, you will likely find the right package name.
The packages for the generic programs are generally just their names, though vim and emacs are often of the form NAME-INTERFACE where INTERFACE depends on whether it is GUI or terminal (e.g. nox would be terminal, gui or gtk would be GUI).