194 days ago · Tech · hide · Fediverse post

The chroot utility runs a process with the given directory set as the root / directory of its filesystem. There are many use cases for such a tool, e.g. to mess with a different Linux system without booting it, to run glibc software on a musl-based host, or to test examples on a fresh system.This article will not dwell on security concerns: we’ll assume the software we run is not adversiarial. If secure sandboxing is your primary interest, then further measures beyond chroot are necessary to set up a true container, e.g. namespaces and cgroups (see this blog). Containerization software such as Docker automatically manages all these aspects for you.Table of ContentsSetting up a root directorySharing kernel drivers and hardwareNetwork accessTerminal interfacesDisplay windows and audioFull script with cleanupSetting up a root directoryThe easiest way to setup a sysroot is to download a prebuilt one from a Linux distribution, e.g. the rootfs tarball from Void Linux.$ mkdir void_sysroot &&…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town