Linux学习.4

#系统初始化#

BIOS选择启动引导程序

Boot Loader加载系统内核

内核启动系统

初始化进程 #init# 是Linux系统启动后第一个进程,负责系统初始化工作(挂载文件系统、交换分区、启动各项进程服务等)。在RHEL 7之前,初始化进程为#System V init#,在7版本及之后,采用systemd初始化进程服务代替,涉及许多服务管理命令变动。

系统运行等级/目标对比:

System V init运行级别                systemd目标名称

0                                                poweroff.target

1                                                rescue.target

2                                                multi-user.target

3                                                multi-user.target

4                                                multi-user.target

5                                                graphical.target

6                                                reboot.target

emergency                                emergency.target

用户可以通过修改# /etc/systemd/system/default.target #的链接对象来设置默认运行目标(eg:ln -sf /lib/systemd/system/multi-user.target   /etc/systemd/system/default.target)

服务管理命令对比:

System V init                                        systemd

service foo start                                    systemctl start        启动

service foo restart                                 systemctl restart        重启

service foo stop                                     systemctl stop        停止

service foo reload                                 systemctl reload        重新加载配置文件

service foo status                                  systemctl status        查看状态

chkconfig foo on                                    systemctl enable        开机自动启动

chkconfig foo off                                    systemctl disable        开机不自动启动

chkconfig foo                                         systemctl is-enabled        查看指定服务是否为开机自动启动

chkconfig --list                                       systemctl list-unit-files --type=        查看各个级别下服务的自启动情况

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值