Linux /etc目录,及系统服务

etc这个目录用来存放所有的系统管理所需要的配置文件和子目录
#网卡配置文件
/etc/sysconfig/network-script/ifcfg-eth0

#修改机器名以及网卡,网管等配置
/etc/sysconfig/network

#linux的dns客户端配置文件,实现域名和ip的互相解析
/etc/resolv.conf

#本地dns解析文件,设定ip和域名的对应解析,开发测试最常用的临时域名解析
/etc/hosts/

#系统全局环境变量永久生效的配置文件,如PATH等
/etc/profile

#用户的环境变量
~/.bash_profile 
~/.bashrc

#存放可执行程序的目录,大多是系统管理命令
/usr/sbin

#存放用户自编译安装软件的目录  > 等同于C:\Program files (windows)
/usr/local

#关于处理器的信息,还可以top指令查看
/proc/cpuinfo

#查看内存信息,还可以free -m
/proc/meminfo

REHEL7 中管理系统服务的相关命令:

启动服务     systemctl start nginx

重启服务     systemctl restart nginx

停止服务     systemctl stop nginx

重新加载配置文件(不终止服务)ystemctl reload nginx

查看服务状态    ystemctl status nginx

设置开关机启动

开机自动启动    systemctl enable nginx

开机不自动启动   systemctl disable nginx

查看服务是否开机启动    systemctl is-enabled nginx

上一篇:Linux df命令

下一篇:pip is configured with locations that require TLS/SSL