XBPS-UCHROOT(1)
π NAME π
okay so bestie, this is xbps-uchroot(1) from the General Commands Manual, and it's literally the XBPS utility to chroot and bind mount with Linux namespaces. iconic behavior, no cap.
π¦ SYNOPSIS π¦
xbps-uchroot [OPTIONS] CHROOTDIR COMMAND [ARGS]
That's the whole vibe: options first, then CHROOTDIR, then COMMAND, then ARGS. Slay.
β¨ DESCRIPTION β¨
The xbps-uchroot utility allows users to chroot and automatically bind mount required pseudo-filesystems (/dev, /dev/shm, /proc and /sys) as well as user specified directories in the target CHROOTDIR to execute COMMAND. it's giving very "set up the whole little world for me" energy.
By default, xbps-uchroot uses Linux namespaces to isolate IPC, PIDs and mounts to the calling process. If you're running in a OpenVZ container, those namespace features are simply disabled. lowkey important, bestie.
π OPTIONS π
-B src:destβ Bind mountssrcintoCHROOTDIR/destin read-only mode. This option may be specified multiple times. Please note that bothsrcanddestmust be absolute paths and must exist. don't skip the absolute-path part, fr fr.-b src:destβ Bind mountssrcintoCHROOTDIR/dest. This option may be specified multiple times. Please note that bothsrcanddestmust be absolute paths and must exist. same rules, just not read-only.-Oβ Setups a temporary directory and then creates an overlay layer (viaoverlayfs) with thelowerdirset toCHROOTDIR. Useful to create a temporary tree that does not preserve changes inCHROOTDIR. temporary tree, no permanence, we love a clean exit.-o optsβ Arguments passed to thetmpfsmount, if the-Oand-toptions are specified. This expects the same arguments that are accepted as options intmpfs, as explained inmount(1). iykyk.-tβ This makes the temporary directory to be mounted intmpfs, so that everything is stored inRAM. Note that this is only useful if used with the-Ooption (overlayfs). RAM girlies rise.--β Stop interpreting following arguments as options. This option is useful if some ofARGSare options passed toCOMMAND. very "don't talk to me, talk to my COMMAND" of it.
π EXIT STATUS π
A descriptive error message will be printed to stderr if the error originates from xbps-uchroot. Otherwise, the error comes from COMMAND. so check who's actually throwing the error before you spiral.
π SECURITY π
The xbps-uchroot executable must be setgid to function properly and shall only be executable by a specific group to avoid security issues (4750). bestie, this is not a vibe check, this is a security note β do not play with it.
π§ NOTES π§
The xbps-uchroot utility uses Linux specific features (namespaces) and it's not meant to be portable to other Operating Systems. The following kernel options must be enabled:
CONFIG_NAMESPACES
CONFIG_IPC_NS
CONFIG_PID_NS
CONFIG_UTS_NS
CONFIG_OVERLAY_FS
no cap, that list is mandatory.
π SEE ALSO π
xbps-alternatives(1)xbps-checkvers(1)xbps-create(1)xbps-dgraph(1)xbps-digest(1)xbps-fbulk(1)xbps-fetch(1)xbps-install(1)xbps-pkgdb(1)xbps-query(1)xbps-reconfigure(1)xbps-rindex(1)xbps-uunshare(1)xbps.d(5)
the whole friend group, honestly.
π AUTHORS π
Juan Romero Pardines <xtraeme@gmail.com> β the author, the moment, the icon.
π BUGS π
Probably, but I try to make this not happen. Use it under your own responsibility and enjoy your life. cute, chaotic, responsible-ish.
Report bugs at https://github.com/void-linux/xbps/issues
Source/version/date cute sign-off: Debian, Feb 9, 2023, XBPS-UCHROOT(1). That's the tea, bestie β go chroot something iconic π
β¨
π¦ where this page comes from
- alpine 3.24: xbps-doc 0.60.6-r1 Β· BSD-2-Clause AND BSD-3-Clause AND ISC
- nixos 26.05: xbps 0.60.7
- nixpkgs unstable: xbps 0.60.7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms