四时宝库

程序员的知识宝库

Kali与Shell编程 -- 关机和重启操作

一、课前声明

1、本分享仅做学习交流,请自觉遵守法律法规!

2、搜索:Kali与编程,学习更多网络攻防干货!

二、知识点详解

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

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

基本语法

一句一例解读20条Linux常用指令,学会了你就入门了

玩过Linux的朋友都知道,Linux是基于命令行的操作系统,学习Linux必须学习Linux的指令,但是Linux的指令群非常庞大,很多“小白”无从下手,作者根据多年授课经验,总结了20条Linux入门指令,希望给学习Linux的新手们一点帮助。

测试主机:CentOS7

20条Linux常用指令

1、关机:init 0 重启:init 6

18条LINUX系统管理命令总结(一、常用系统工作命令)

1、echo命令

2.date命令

3.reboot命令

reboot命令用于重启系统。

4.poweroff命令

Linux命令大全(排版清晰持续更新非常详细)

前言

最近在使用Linux的时候,发现有很多命令不太会。在csdn查阅命令大全的时候,发现很多文章都没有很好的排版,于是写一篇文章,希望能够帮助到大家!文章内容较多,可以在右侧目录直接找自己需要的部分查看。文章会持续更新,欢迎大家点赞,收藏!

更新公告

2020.6.28新增了Linux三剑客awk,sed,grep

注意:为了方便代码阅读,文章代码块里把表示管理员模式的#都去掉了。这不是错误。不要搞错!!

跟老韩学Ubuntu Server 2204-开关机-reboot指令帮助手册

reboot指令帮助手册如下。

HALT(8)                                                  halt                                                  HALT(8)

NAME
       halt, poweroff, reboot - Halt, power-off or reboot the machine

SYNOPSIS
       halt [OPTIONS...]

       poweroff [OPTIONS...]

       reboot [OPTIONS...]

DESCRIPTION
       halt, poweroff, reboot may be used to halt, power-off, or reboot the machine. All three commands take the same
       options.

OPTIONS
       The following options are understood:

       --help
           Print a short help text and exit.

       --halt
           Halt the machine, regardless of which one of the three commands is invoked.

       -p, --poweroff
           Power-off the machine, regardless of which one of the three commands is invoked.

       --reboot
           Reboot the machine, regardless of which one of the three commands is invoked.

       -f, --force
           Force immediate halt, power-off, or reboot. When specified once, this results in an immediate but clean
           shutdown by the system manager. When specified twice, this results in an immediate shutdown without
           contacting the system manager. See the description of --force in systemctl(1) for more details.

       -w, --wtmp-only
           Only write wtmp shutdown entry, do not actually halt, power-off, reboot.

       -d, --no-wtmp
           Do not write wtmp shutdown entry.

       -n, --no-sync
           Don't sync hard disks/storage media before halt, power-off, reboot.

       --no-wall
           Do not send wall message before halt, power-off, reboot.

EXIT STATUS
       On success, 0 is returned, a non-zero failure code otherwise.

NOTES
       These commands are implemented in a way that preserves basic compatibility with the original SysV commands.
       systemctl(1) verbs halt, poweroff, reboot provide the same functionality with some additional features.

       Note that on many SysV systems halt used to be synonymous to poweroff, i.e. both commands would equally result
       in powering the machine off. systemd is more accurate here, and halt results in halting the machine only
       (leaving power on), and poweroff is required to actually power it off.

SEE ALSO
       systemd(1), systemctl(1), shutdown(8), wall(1)

systemd 249                                                                                                    HALT(8)

使用 Python 注销、重启、关闭计算机

众所周知,Python 是一种功能强大的脚本语言。在本文中,将编写一个 Python 程序本控制计算机,实现计算机的注销、重启、关闭等操作。

Linux系统中重启系统的命令(重启命令 linux)

重启系统

在 Oracle Linux (Red Hat Linux ) 系统中提供了以下4个重新启动Linux系统的命令:

  1. shutdown -r now : 其中r是reboot的首字母,最后的now表示时间。

  2. reboot: 重新启动系统。

linux命令详解之三高级指令(linux命令详解之三高级指令是什么)

hostname指令

作用:操作服务器的主机名称【读取,设置】

语法1:#hostname 输出完整的主机名称

语法2:#hostname -f 当前主机命中的FQDN【全限定域名】

linux命令详解(linux命令详解之ls命令)



linux系统信息命令

arch 显示机器的处理器架构

uname -m 显示机器的处理器架构

uname -r 显示正在使用的内核版本

dmidecode -q 显示硬件系统部件 - (SMBIOS / DMI)

hdparm -i /dev/hda 罗列一个磁盘的架构特性

「Nginx」Linux常用命令------启动、停止、重启

启动

启动代码格式:nginx安装目录地址 -c nginx配置文件地址

例如:

[root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

停止

nginx的停止有三种方式:

从容停止

  1、查看进程号

[root@LinuxServer ~]# ps -ef|grep nginx

<< < 1 2 3 4 5 6 > >>
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言
    友情链接