cat /etc/redhat-release
看到操作系统的版本是CentOS Linux release 7.6.1810 (Core)
,uname -r
可以看到内核版本是3.10.0-957.21.3.el7.x86_64
。
在CentOS 7中有两种服务集中管理工具:
service
systemctl
/etc/init.d/
中放着service
的启动脚本。比如network
这个脚本里边就有网络服务的启动脚本,cat network | wc -l
可以看到这个文件中有264行内容。
/usr/lib/systemd/system
下放着systemctl
的启动脚本,比如sshd.service
放着sshd服务的启动脚本。
chkconfig --list
可以看一下service
的级别。