Skip to content

Commit e8aae06

Browse files
committed
docs(intro): edit 查看系统信息
1 parent 996121a commit e8aae06

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/intro.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 查看系统信息
44

5+
(1)`/etc/os-release`文件
6+
57
`/etc/os-release`文件包含当前系统的标识数据和发行信息,查看此文件可以了解当前系统的发行版信息。
68

79
```bash
@@ -10,27 +12,44 @@ $ cat /etc/os-release
1012

1113
这个文件包含在 SystemD 软件包,只要当前发行版使用 SystemD,一般就会包含这个文件。
1214

13-
`/etc/issue`文件也会包含当前发行版的名称。
15+
RedHat 相关发行版还会有`/etc/redhat-release`文件。
16+
17+
(2)`/etc/issue`文件
18+
19+
`/etc/issue`文件也会包含当前系统的版本名称。
1420

1521
```bash
1622
$ cat /etc/issue
1723
```
1824

25+
(3)`hostnamectl`命令
26+
1927
`hostnamectl`命令用于查找和更改系统主机名,也可以用它显示当前系统的版本信息。
2028

2129
```bash
2230
$ hostnamectl
2331
```
2432

33+
(4)`uname`命令
34+
2535
`uname`命令可以显示系统信息,包含 Linux 内核架构、名称、发布版。
2636

2737
```bash
2838
$ uname -a
2939
```
3040

41+
(5)`lsb-release`命令
42+
3143
如果系统安装了`lsb-release`软件包,就可以用`lsb-release`命令查看当前系统的发行版。
3244

3345
```bash
3446
$ lsb-release
3547
```
3648

49+
(6)`/proc/version`文件
50+
51+
`/proc/version`文件也包含了内核和版本信息。
52+
53+
```bash
54+
$ cat /proc/version
55+
```

0 commit comments

Comments
 (0)