Linux 系统启动过程

详细过程能够查看  http://www.runoob.com/linux/linux-system-boot.htmlhtml

Linux系统的启动过程并非你们想象中的那么复杂,其过程能够分为5个阶段:linux

  • 内核的引导。
  • 运行 init。
  • 系统初始化。
  • 创建终端 。
  • 用户登陆系统。

Linux 关机

在linux领域内大多用在服务器上,不多遇到关机的操做。毕竟服务器上跑一个服务是永无止境的,除非特殊状况下,不得已才会关机。服务器

正确的关机流程为:sync > shutdown > reboot > haltspa

关机指令为:shutdown ,你能够man shutdown 来看一下帮助文档。server

例如你能够运行以下命令关机:htm

sync 将数据由内存同步到硬盘中。

shutdown 关机指令,你能够man shutdown 来看一下帮助文档。例如你能够运行以下命令关机:

shutdown –h 10 ‘This server will shutdown after 10 mins’ 这个命令告诉你们,计算机将在10分钟后关机,而且会显示在登录用户的当前屏幕中。

Shutdown –h now 立马关机

Shutdown –h 20:25 系统会在今天20:25关机

Shutdown –h +10 十分钟后关机

Shutdown –r now 系统立马重启

Shutdown –r +10 系统十分钟后重启

reboot 就是重启,等同于 shutdown –r now

halt 关闭系统,等同于shutdown –h now 和 poweroff

最后总结一下,无论是重启系统仍是关闭系统,首先要运行 sync 命令,把内存中的数据写到磁盘中。内存

关机的命令有 shutdown –h now halt poweroff init 0 , 重启系统的命令有 shutdown –r now reboot init 6文档

相关文章
相关标签/搜索