Linux command
salt-minion 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start the Salt minion daemon
salt-minion
Start the Salt minion
salt-minion -d
Start with a specific configuration directory
salt-minion -c [/etc/salt]
Start with debug logging
salt-minion -l debug
Start without the keepalive restart wrapper
salt-minion --disable-keepalive
说明
salt-minion is the agent daemon that runs on managed systems in a SaltStack infrastructure. It connects to a Salt master, receives commands, executes them locally, and returns results. On startup, the minion generates a key pair and sends its public key to the master for acceptance. Once accepted, the minion subscribes to the master's ZeroMQ publish socket to receive commands. Configuration is stored in /etc/salt/minion or the /etc/salt/minion.d/ directory. The minion can also run in masterless mode using salt-call --local, enabling local configuration management without a master. Setting master_type: disable allows running beacons and engines without master connectivity.
参数
- -d, --daemon
- Run the Salt minion as a daemon in the background
- -c _DIR_, --config-dir=_DIR_
- Specify the configuration directory (default: /etc/salt)
- -l _LEVEL_, --log-level=_LEVEL_
- Console log level: info, warning, error, debug, trace, garbage, quiet (default: warning)
- --log-file=_FILE_
- Specify the log file path (default: /var/log/salt/minion)
- --log-file-level=_LEVEL_
- Log file logging level
- --pidfile=_FILE_
- Specify the location of the pidfile (default: /var/run/salt-minion.pid)
- -u _USER_, --user=_USER_
- Specify user to run salt-minion
- --disable-keepalive
- Disable automatic restart mechanism; run daemon directly
- -h, --help
- Print help message and exit
- --version
- Print version information
FAQ
What is the salt-minion command used for?
salt-minion is the agent daemon that runs on managed systems in a SaltStack infrastructure. It connects to a Salt master, receives commands, executes them locally, and returns results. On startup, the minion generates a key pair and sends its public key to the master for acceptance. Once accepted, the minion subscribes to the master's ZeroMQ publish socket to receive commands. Configuration is stored in /etc/salt/minion or the /etc/salt/minion.d/ directory. The minion can also run in masterless mode using salt-call --local, enabling local configuration management without a master. Setting master_type: disable allows running beacons and engines without master connectivity.
How do I run a basic salt-minion example?
Run `salt-minion` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d, --daemon do in salt-minion?
Run the Salt minion as a daemon in the background