Linux command
systemctl-preset-all 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo systemctl preset-all
Enable
sudo systemctl preset-all --preset-mode enable-only
Disable
sudo systemctl preset-all --preset-mode disable-only
Quiet
sudo systemctl preset-all -q
说明
systemctl preset-all resets the enablement state of all installed unit files to the defaults defined in preset policy files. This applies distribution default settings to every unit on the system. This is typically run once after initial system installation or when resetting to distribution defaults.
参数
- --preset-mode= _MODE_
- full (default), enable-only, or disable-only
- -q, --quiet
- Suppress output, return only exit code
- --user
- Operate on user units
FAQ
What is the systemctl-preset-all command used for?
systemctl preset-all resets the enablement state of all installed unit files to the defaults defined in preset policy files. This applies distribution default settings to every unit on the system. This is typically run once after initial system installation or when resetting to distribution defaults.
How do I run a basic systemctl-preset-all example?
Run `sudo systemctl preset-all` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --preset-mode= _MODE_ do in systemctl-preset-all?
full (default), enable-only, or disable-only