sudo touch /etc/sudoers.d/admin echo"<用户名> ALL=(root)NOPASSWD:ALL" | sudo tee /etc/sudoers.d/admin
配置 SELinux
查看目前的配置状态
1
getenforce
设置SELinux为宽容模式
1
setenforce 0
修改SELinux运行模式(配置完后需要重启系统)
1
vim /etc/selinux/config
配置文件如下
1 2 3 4 5 6 7 8 9 10 11
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # change to disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
常用文件或目录整理
地址
说明
/etc/profile.d/
每个用户都有的环境变量
~/.bashrc
用户终端(shell)的相关配置
/etc/hosts
host文件
/etc/exports
NFS配置
/var/named*
DNS配置
/etc/chrony.conf
NTP配置
/etc/fstab
磁盘挂载配置
/etc/selinux/config
SELinux配置
/etc/*release
Linux 版本说明
配置 Terminal 快捷键
在 Fedora 系统上没有快捷打开 Terminal 的快捷键,需要进行如下设置:
打开 Settings 系统设置页
选择 Keyborad 键盘配置项
点击 Keyboard Shortcuts 配置中的 View and Customize Shortcuts 选项