4

Linux常用命令-32:dmesg

 2 years ago
source link: https://xugaoxiang.com/2022/06/10/linux-cmds-32-dmesg/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

dmesg 命令用于检查和控制内核的环形缓冲区。kernel会将开机信息存储在 ring buffer 中。我们一般利用 dmesg 来查看系统的开机信息。同时这些开机信息都保存在文件 /var/log/dmesg 里。

语法格式:dmesg [参数]

常用参数:

57c1e6c5bdd1d612.png
# 查看开机过程中的网卡eth0
dmesg | grep eth0
38f28727515e8a18.png
# 清空环形缓冲区中的日志
dmesg -c

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK