Skip to content

Commit 1640e5d

Browse files
authored
Update and rename telint.md to telinit.md
1 parent 538bd51 commit 1640e5d

File tree

2 files changed

+50
-26
lines changed

2 files changed

+50
-26
lines changed

command/telinit.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
telinit
2+
===
3+
4+
切换当前正在运行系统的运行等级
5+
6+
## 补充说明
7+
8+
**telinit命令** 用于切换当前正在运行的Linux系统的运行等级。
9+
10+
_RUNLEVEL_ 参数应该是多用户运行级别 `2-5` 之一,`0` 用于停止系统,`6` 用于重新启动系统,或 `1` 用于使系统进入单用户模式。
11+
12+
通常您会使用 `shutdown(8)` 工具来停止或重新启动系统,或者将其降低到单用户模式。
13+
14+
_RUNLEVEL_ 也可能是 S 或 s ,这会将系统直接置于单用户模式,而无需先实际停止进程,您可能不希望这样。
15+
16+
通过发出 `runlevel(7)` 事件来更改运行级别,该事件包括 _RUNLEVEL_ 环境变量中的新运行级别以及 PREVLEVEL 变量中的先前运行级别(从环境或 `/var/run/utmp` 获得)。
17+
18+
**telinit** 会将新的运行级别写入 `/var/run/utmp` 并将新条目附加到 `/var/log/wtmp`
19+
20+
### 语法
21+
22+
```shell
23+
telint(选项)(参数)
24+
telinit [OPTION]... RUNLEVEL
25+
```
26+
27+
### 选项
28+
29+
```shell
30+
-t:指定等待的秒数。
31+
-e 键=值
32+
```
33+
34+
这指定了与 _RUNLEVEL__PREVLEVEL_ 一起包含在事件中的附加环境变量。
35+
36+
### 参数
37+
38+
运行等级:指定要切换的运行等级。
39+
40+
### Environment
41+
42+
RUNLEVEL
43+
44+
如果设置优先于从 `/var/run/utmp` 读取,`telinit` 将从该环境变量读取当前运行级别
45+
46+
### Files
47+
48+
- `/var/run/utmp` 将从哪里读取当前运行级别; 此文件也将使用新的运行级别进行更新。
49+
- `/var/log/wtmp` 新的运行级别记录将附加到此文件中以获取新的运行级别。
50+

command/telint.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)