Linux认知
单词:
boot 启动,
loader 加载器,
gnu 牛羚,
kernel 内核
core 核心
系统启动顺序: 启动界面(主板) ➡️Bootloader(GRUB) ➡️Linux ➡️Linux程序
操作系统的核心: 内核 ,内核并不等于操作系统
内核提供系统服务: 比如 文件管理, 虚拟内存, 设备 I/O等
基本程序:比如 文本编辑器, 编译器, 外科程序 shell
系统
Linux发行版
Red Hat: 性能稳定 收费版
Fedora: Red Hat 的社区免费版
CentOS: 算是RHEL的克隆版,免费.
Deepin: 中国发型.
Bebian: 老linux
Ubuntu: bebian分支
桌面管理器
- Gnome
- KDE
- XFCE
CentOS下载
centos/)
#docker 创建centos进行步骤1# //docker 搜索centos镜像docker search centos2# //下载centosdocker pull centos3# // 启动docker,进入交互模式-it , centos ,运行bashdocker run -it centos /bin/bash#补充docker命令//删除镜像docker rmi 镜像id//删除运行时docker rm 运行时id// docker 所有镜像docker images -a// docker 所有运行时docker ps -a// 连接中间退出的运行时docker attach 项目ID
Linux 关机(halt reboot sync)
在linux领域内大多用在服务器上,很少遇到关机的操作。毕竟服务器上跑一个服务是永无止境的,除非特殊情况下,不得已才会关机。
正确的关机流程为:sync > shutdown > reboot > halt
关机指令为:shutdown ,你可以man shutdown 来看一下帮助文档。
例如你可以运行如下命令关机:
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。
