Linux command
etckeeper 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Initialize
sudo etckeeper init
Commit
sudo etckeeper commit [message]
Example
sudo etckeeper vcs [status]
Check
sudo etckeeper unclean
Stop tracking
sudo etckeeper uninit
说明
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.
参数
- init
- Initialize repository in /etc
- commit _message_
- Commit all changes
- vcs _command_
- Run VCS command on repo
- unclean
- Check for uncommitted changes
- uninit
- Remove repository
- pre-install
- Run before package install
- post-install
- Run after package install
FAQ
What is the etckeeper command used for?
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.
How do I run a basic etckeeper example?
Run `sudo etckeeper init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does init do in etckeeper?
Initialize repository in /etc