jk_update(8)
π jk_update(8) π
okay so bestie, welcome to jk_update β section 8 of the manual, jailkit edition. this is the little utility that keeps a jail in sync with the real system, and honestly? it's giving β¨janitor energyβ¨ but make it iconic. let's get into it.
πΈ NAME πΈ
jk_update β a utility to update and cleanup a jail according to changes on the real system π§Ήβ¨
π SYNOPSIS π
jk_update -j <jail>
jk_update -c <section of configfile>
jk_update -v -d -k -j <jail> -s <file to skip> <dir to scan for updates>
jk_update --verbose --dry-run --hardlink --jail=<jail> --skip=<file to
skip> <dir to scan for updates>
π¦ DESCRIPTION π¦
so what does jk_update actually do, you ask? π
it goes and compares the files in a jail with the corresponding files on the real system. and if the corresponding file on the real system is newer, and the file on the real system is different, then the file from the real system gets copied to the jail β including any required libraries β just like jk_cp would do. π«Ά
and the flip side? files that do not exist on the real system get deleted in the jail. no cap. π
jk_update works really well to pass security updates on the real system to a jail. π but bestie, listen β jk_update does not work well with larger upgrades on the real system. in that case files are often replaced by other files, in which case jk_update will delete the old file but not copy the new file. π so likeβ¦ keep that in mind.
π« Avoid unwanted updates or cleanups
to avoid unwanted updates, or to avoid files being deleted, files or directories can be skipped by jk_update β either by specifying them on the commandline or by specifying them in the configfile. easy peasy. π
π Directories to include in the update
by default jk_update will scan /usr, /bin, /opt, and /lib for updates. π
if one or more arguments is passed as directories to update, these default directories are not scanned, unless they are part of the arguments. the default directories can also be set in the config file. β¨
jk_update -j <jail> will scan <jail>/usr, <jail>/bin, <jail>/opt, and
<jail>/lib, while jk_update -j <jail> /bin will only scan <jail>/bin
π EXAMPLE π
an example configfile could look like this:
[/home/testchroot]
skips = /usr/bin/myscript
hardlinks = 1
directories = /usr, /bin, /lib
[/home/otherjail]
skips = /usr/share/firefox, /usr/bin/firefox, /usr/lib/firefox
where the options have the following meaning:
skipsβ the files and directories to skip πhardlinksβ a boolean whether to use hardlinks (1) or copy the files (0)directoriesβ specifies the directories to include in the update. π
β οΈ WARNING β οΈ
if you have changed files in the jail, it is recommended to do a "dry run" first and see what jk_update will do. π
jk_update does now know if a file is manually changed or not. (yes bestie, that's literally what it says β it does not know. π)
if a file in the jail is older and different from the file on the real system it is updated. if a file in the jail does not have an equivalent on the real system it is deleted. π
use the skip option to exclude any files that you changed or added manually. fr fr, protect your babies. π«Ά
β¨ OPTIONS β¨
-v,--verboseβ will give verbose output π£οΈ-h,--helpβ the help screen-c <section in configfile>,--configsection=<section in configfile>β the jail to update-j <jail>,--jail=<jail>β the jail to update π-d,--dry-runβ do a"dry run". show what will be done but don't do anything. π»-k,--hardlinkβ try to create hardlinks instead of copying the files when updating π-s <file to skip>,--skip <file to skip>β do not update this file. the argument can either be the path in the jail or the path on the real system. in order to skip multiple files, use this option multiple times. π βοΈ
π SEE ALSO π
jailkit(8) jk_check(8) jk_chrootlaunch(8) jk_chrootsh(8) jk_cp(8) jk_init(8) jk_jailuser(8) jk_list(8) jk_lsh(8) jk_procmailwrapper(8) jk_socketd(8) jk_uchroot(8) chroot(2)
π COPYRIGHT π
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Olivier Sessink
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
and that's the whole page bestie, no crumbs left. π this one's from the JAILKIT crew, dated 07-02-2010, and you can find it chilling in section 8 as jk_update(8). slay, go update your jails responsibly. π
β¨π
π¦ where this page comes from
- debian bookworm: jailkit 2.23-2 Β· BSD-3-Clause
- debian trixie: jailkit 2.23-2+b1 Β· BSD-3-Clause
- ubuntu jammy: jailkit 2.23-1 Β· BSD-3-Clause
- ubuntu noble: jailkit 2.23-2 Β· BSD-3-Clause
- ubuntu questing: jailkit 2.23-2
- ubuntu resolute: jailkit 2.23-3 Β· BSD-3-Clause
- ubuntu stonking: jailkit 2.23-3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms