Linux 系统初始化进程

Linux 系统初始化进程

System V init 运行级别Systemd 目标名称Systemd 目标作用
0poweroff.target关机
1rescue.target单用户模式
2multi-user.target多用户的文本界面
3multi-user.target多用户的文本界面
4multi-user.target多用户的文本界面
5graphical.target多用户的图形界面
6reboot.target重启
7emergency.target救援模式

RHEL 5/6 系统使用 service、chkconfig 等命令来管理系统服务,RHEL 7/8 系统使用 systemctl 命令来管理系统服务

服务启动、重启、停止、重载、查看状态等常用命令:

RHEL 5/6 系统RHEL 7/8 系统作用
service foo startsystemctl start httpd启动服务
service foo restartsystemctl restart httpd重启服务
service foo stopsystemctl stop httpd停止服务
service foo reloadsystemctl reload httpd重新加载配置文件(不终止服务)
service foo statussystemctl status httpd查看服务状态

服务开机启动、开机不启动、查看各级别下服务启动状态等常用命令:

RHEL 5/6 系统RHEL 7/8 系统作用
chkconfig foo onsystemctl enable httpd开机自动启动
chkconfig foo offsystemctl disable httpd开机不自动启动
chkconfig foosystemctl is-enabled httpd查看特定服务是否为开机自启动
chkconfig --listsystemctl list-unit-files-type=httpd查看各个级别下服务的启动与禁用情况
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值