rhel 7系统常用命令+详细实例

时间:2021-10-31 05:54:27
【文件属性】:

文件名称:rhel 7系统常用命令+详细实例

文件大小:69KB

文件格式:DOCX

更新时间:2021-10-31 05:54:27

rhel7

RHEL 7版本系统的基础命令统计加用法实例说明 例: selinux相关 *1.setenforce {0.1} 调整selinux为宽松模式或严格模式 *2.stat file 查看文件的selinux上下文信息 *3.chcon –u system_u file 修改file的selinux上下文user信息为system_u 4. chcon –r object_r file 修改file的selinux上下文role信息为object_r 5. chcon –t admin_home_t 修改file的selinux上下文tepe信息为 admin_home_t 6. chcon –u system_u -R /directory 修改文件夹内所有文件selinux上下文 7. chcon --reference=file1 file2 根据file1为模板,修改file2 *8. restorecon [-f infilename] (-R file/-e directory) [从文件中读将要还原的列表] 恢复文件/文件夹的selinux上下文 *9.getsebool –a 获取所有可更改的selinux布尔值 10.getsebool zebra_write_config 显示zebra_write_config的布尔值 *11.setsebool zebra_write_config=1/on 开启zebra_write_config 12.setsebool –P zebra_write_config=1/on 更改后并写进策略文件中


网友评论