四时宝库

程序员的知识宝库

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

Linux系统常用命令总结笔记6---内核模块和系统开关机管理

---insmod: 用于动态加载模块的驱动ko文件,建议使用modprobe;

参数:

3个重启Linux系统的命令(以及4个安全实现的方式)

本文译自:3 commands to reboot Linux (plus 4 more ways to do it safely)

译者:开源视界

校对:OpenView

原文遵循:CC -BY-SA 4.0

学习如何通过不同的方法来重启Linux系统,从GUI深入到命令行。

Linux具有的不是连续运行几个星期而是能连续运行几年而不用重启的能力。在一些生产中,Linux就是那样干的,这多亏与

Linux启动顺序、运行级别及开机启动

一、启动顺序

当我们经过BIOS引导,并选择了Linux作为准备引导的操作系统后,接下来的执行顺序如下:

1、加载并执行内核

第一个被加载的东西就是内核。然后把内核在内存中解压缩,就可以开始运行了。

2、/sbin/init进程

init进程是接下来第一个被启动运行的(非内核进程),因此它的进程编号PID的值总是1。

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言
    友情链接