etckeeper
version control for /etc directory
TLDR
Initialize Git repo in /etc
SYNOPSIS
etckeeper command [arguments]
DESCRIPTION
etckeeper tracks system configuration files in /etc using version control (Git, Mercurial, Bazaar, or Darcs). It integrates seamlessly with package managers like apt, yum, pacman, and dnf to automatically commit changes before and after package operations.
This provides an audit trail of all system configuration modifications, making it possible to review what changed when, understand why a system behaves differently after updates, and revert problematic changes. The tool preserves file permissions and metadata that Git normally doesn't track.
etckeeper is valuable for system administrators managing multiple servers, troubleshooting configuration issues, and maintaining compliance documentation.
PARAMETERS
init
Initialize repository in /etccommit message
Commit all changesvcs command
Run VCS command on repounclean
Check for uncommitted changesuninit
Remove repositorypre-install
Run before package installpost-install
Run after package install
CONFIGURATION
/etc/etckeeper/etckeeper.conf
Main configuration file specifying VCS to use, package manager hooks to enable, and files to ignore.
CAVEATS
Requires root privileges. Must run from /etc directory for init. Integrates with apt, yum, and pacman. Sensitive files may need gitignore entries.
SEE ALSO
git(1)
