linux常用
1.linux目录(以centos7为例)
linux下,一切皆文件。文件皆存在于目录之中。
/ 根目录 /bin 软链接,指向 /usr/bin/目录,存储常用命令 /sbin /usr/sbin/ /lib /usr/lib/ /lib64 /usr/lib64/
2.关闭selinux
selinux是linux的一个内核模块
暂时关闭selinux
setenforce 0
永久关闭selinux
vim /etc/sysconfig/selinux
进入vim修改selinux文件
# 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 # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
原本的 SELINUX=enforcing,修改为上标色代码所示,重启服务器,则永久性关闭selinux。
3. /etc/passwd 文件
name:password:uid:gid:comment:home:shell |-->文件格式