ETCKEEPER(8)

πŸ“¦
version 1.18.23 Β· 2 versions
  • 1.18.23 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.18.21 Β· opensuse-leap 16.0
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ 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 the VCS setting in /etc/etckeeper/etckeeper.conf). typically you run this in /etc once, when you're first starting to use etckeeper on a machine. you can also use it to initialise a clone of the /etc repository that's located elsewhere. one command, two uses, we love a multitasker 🫢
  • commit [message] β€” commits all the changes in /etc to 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 commit will notice if a user has used sudo or su to 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's DPkg::Pre-Install-Pkgs hook, 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's DPkg::Post-Invoke hook, 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 running dpkg by 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 -a switch 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 the init command: 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 run etckeeper uninit, then modify etckeeper.conf to use a different VCS, and then run etckeeper init. (and the -f switch can be used to force uninit without prompting. no takebacks.)
⚠️ real talk: uninit is literally the inverse of init and it removes your VCS info and etckeeper's bookkeeping info. that's data. gone. be careful. ⚠️

✨ FILES ✨

  • /etc/etckeeper/etckeeper.conf is the configuration file. the blueprint. the moment. πŸŽ€
  • /etc/etckeeper also 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. πŸ’…βœ¨πŸ«Ά