ETCKEEPER(8)
π ETCKEEPER β the etckeeper(8) page, but make it cute
okay bestie, sit down, hydrate, because we're about to talk about putting your entire /etc in version control and honestly? it's giving main character energy. this is section 8 of the manual, so it's a sysadmin-level thing, and it's about to be your new obsession. π
β¨ NAME β¨
etckeeper β store /etc in git, mercurial, bazaar, or darcs π¦
β¨ SYNOPSIS β¨
etckeeper command [-d directory]
β¨ DESCRIPTION β¨
so the whole vibe is this: etckeeper manages /etc being stored in a git, mercurial, bazaar, or darcs repository. no cap.
by default, every single one of those commands operates on /etc. but β plot twist β you can point it at a different directory if you want, and it'll operate on a clone of the /etc repository that lives somewhere else. cute, right? π
β¨ COMMANDS β¨
initβ this initialises and sets up a git, mercurial, bazaar, or darcs repository (whichever one, it depends on theVCSsetting in/etc/etckeeper/etckeeper.conf). typically you run this in/etconce, when you're first starting to use etckeeper on a machine. you can also use it to initialise a clone of the/etcrepository that's located elsewhere. one command, two uses, we love a multitasker π«Άcommit [message]β commits all the changes in/etcto the repository. you can specify a commit message if you want. you can also just use the underlying VCS and commit manually, no pressure. (heads up though:etckeeper commitwill notice if a user has usedsudoorsuto become root, and it records the original username in the commit. it's keeping receipts, respectfully. π)pre-commitβ this one is called as a pre-commit hook. it stores metadata and does sanity checks. the responsible friend of the group. π§pre-installβ this gets called by apt'sDPkg::Pre-Install-Pkgshook, or by the equivalent hooks of other package managers. it lets you commit any uncommitted changes before packages get installed, upgraded, etc. basically it's the "clean your room before guests arrive" step. πΈpost-installβ this gets called by apt'sDPkg::Post-Invokehook, or by the equivalent hooks of other package managers. it commits the changes that packages made into the repository. (you can also call this by hand after runningdpkgby hand, if that's your thing. no judgement. π)uncleanβ this returns true if the directory contains uncommitted changes. it's a vibe check, essentially. βupdate-ignore [-a]β this updates the VCS ignore file. any content outside a"managed by etckeeper"block is not touched, so don't worry, your stuff is safe. this is generally run when you upgrade to a new version of etckeeper. (and the-aswitch will add a"managed by etckeeper"block if one isn't already there. helpful king. π)vcs subcommand [options ...]β use this to run any subcommand of the VCS that etckeeper is configured to run. it gets run in/etc. for example,"etckeeper vcs diff"will run"git diff", etc. so you're never locked out of your VCS's own powers. slay. π₯uninit [-f]β okay bestie, listen closely, because this command DESTROYS DATA! π it is the inverse of theinitcommand: it removes VCS information and etckeeper's own bookkeeping information from the directory. use with caution, fr fr. a typical use case would be to runetckeeper uninit, then modifyetckeeper.confto use a different VCS, and then runetckeeper init. (and the-fswitch can be used to forceuninitwithout prompting. no takebacks.)
β οΈ real talk:uninitis literally the inverse ofinitand it removes your VCS info and etckeeper's bookkeeping info. that's data. gone. be careful. β οΈ
β¨ FILES β¨
/etc/etckeeper/etckeeper.confis the configuration file. the blueprint. the moment. π/etc/etckeeperalso contains directories containing the programs that are run for each of the above commands. that's where all the little helper scripts live. π
β¨ ENVIRONMENT VARIABLES β¨
ETCKEEPER_CONF_DIRβ path to configuration directory instead of default/etc/etckeeper. in case you want your config somewhere else, because you contain multitudes. π
β¨ SEE ALSO β¨
/usr/share/doc/etckeeper/README.md.gz
β¨ AUTHOR β¨
Joey Hess <id@joeyh.name> π
and that's the whole page, bestie β the etckeeper(8) manual, section 8, exactly as it lives in the wild, no details left behind. go forth and version-control your /etc, you absolute icon. π
β¨π«Ά
π¦ where this page comes from
- alpine 3.22: etckeeper-doc 1.18.22-r0 Β· GPL-2.0-or-later
- alpine 3.23: etckeeper-doc 1.18.23-r1 Β· GPL-2.0-or-later
- alpine 3.24: etckeeper-doc 1.18.23-r1 Β· GPL-2.0-or-later
- arch rolling: etckeeper 1.18.23-3 Β· GPL-2.0-or-later
- debian bookworm: etckeeper 1.18.20-1 Β· GPL-2.0-or-later
- debian trixie: etckeeper 1.18.22-2 Β· GPL-2.0-or-later
- epel 10: etckeeper 1.18.22-3.el10_1 Β· GPL-2.0-or-later
- epel 9: etckeeper 1.18.22-3.el9 Β· GPL-2.0-or-later
- fedora 43: etckeeper 1.18.22-6.fc43 Β· GPL-2.0-or-later
- fedora 44: etckeeper 1.18.22-7.fc44 Β· GPL-2.0-or-later
- ubuntu jammy: etckeeper 1.18.16-1 Β· GPL-2.0-or-later
- ubuntu noble: etckeeper 1.18.20-2 Β· GPL-2.0-or-later
- ubuntu questing: etckeeper 1.18.22-2
- ubuntu resolute: etckeeper 1.18.23-2build1 Β· GPL-2.0-or-later
- ubuntu stonking: etckeeper 1.18.23-2build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms