Linux command
semanage-boolean 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
List
sudo semanage boolean -l
List
sudo semanage boolean -l -C -n
Set
sudo semanage boolean -m --on|--off [haproxy_connect_any]
说明
semanage boolean manages persistent SELinux boolean settings. Booleans allow administrators to customize how SELinux policy rules affect confined processes without modifying the policy itself. Unlike setsebool, which can make temporary changes, semanage boolean changes persist across system reboots. The -C flag shows which booleans have been customized from their default values.
参数
- -l, --list
- List all booleans and their current values
- -m, --modify
- Modify a boolean's persistent value
- -C, --locallist
- Show only locally modified booleans
- -n, --noheading
- Omit column headings from output
- -1, --on
- Set boolean to on/true
- -0, --off
- Set boolean to off/false
FAQ
What is the semanage-boolean command used for?
semanage boolean manages persistent SELinux boolean settings. Booleans allow administrators to customize how SELinux policy rules affect confined processes without modifying the policy itself. Unlike setsebool, which can make temporary changes, semanage boolean changes persist across system reboots. The -C flag shows which booleans have been customized from their default values.
How do I run a basic semanage-boolean example?
Run `sudo semanage boolean -l` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -l, --list do in semanage-boolean?
List all booleans and their current values