Version Control /etc With etckeeper

Put system configuration under git and commit changes automatically.

LinuxbackupgitconfigMedium risk
Run sudo etckeeper vcs status to see uncommitted changes in /etc.

01Command

Command
$ sudo etckeeper vcs status

02What it does

etckeeper initialises a repository in /etc, hooks into package management to commit before and after upgrades, and lets you diff or revert configuration changes with ordinary VCS commands. It turns 'what changed?' into a git log.

03Risk

RiskMedium risk
Requirementssudo apt install etckeeper
!Warning: Version history can contain secrets stored in /etc; protect the repository and never push it to a public remote.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • etckeeper
    Official project · vendor-doc · 2026-09-20
    Evidence: Debian packages etckeeper, which stores /etc in git or another VCS and commits on package changes.
  • Debian package: etckeeper
    Debian · vendor-doc · 2026-09-20
    Evidence: Debian packages etckeeper, which stores /etc in git or another VCS and commits on package changes.

Last verified: 2026-09-22 · Category: System & Settings

06Related solutions