init 命令
2013-12-02 11:08
706 查看
Introduce
NAME
init, telinit - process control initialization
SYNOPSIS
/sbin/init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ]
/sbin/telinit [ -t sec ] [ 0123456sSQqabcUu ]
DESCRIPTIONInit is the parent of all processes. Its primary role is to create processes from a script stored in the file /etc/inittab (see inittab(5)). This file usually has entries which cause init to spawn gettys on each line that users can log in. It also controls autonomous processes required by any particular system.....TELINIT
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action. The following arguments serve as
directives to telinit:
0,1,2,3,4,5 or 6
tell init to switch to the specified run level.
a,b,c tell init to process only those /etc/inittab file entries having runlevel a,b or c.
Q or q tell init to re-examine the /etc/inittab file.
S or s tell init to switch to single user mode.
U or u tell init to re-execute itself (preserving the state). No re-examining of /etc/inittab file happens. Run level should be one of Ss12345, otherwise request would be silently ignored.
telinit can also tell init how long it should wait between sending processes the SIGTERM and SIGKILL signals. The default is 5 seconds, but this can be changed with the -t sec option.
telinit can be invoked only by users with appropriate privileges.
The init binary checks if it is init or telinit by looking at its process id; the real init's process id is always 1. From this it follows that instead of call-ing telinit one can also just use init instead as a shortcut.
Related# runlevel 0 is System halt (Do not use this for initdefault!)
# runlevel 1 is Single user mode
# runlevel 2 is Local multiuser without remote network (e.g. NFS)
# runlevel 3 is Full multiuser with network
# runlevel 4 is Not used
# runlevel 5 is Full multiuser with network and xdm
# runlevel 6 is System reboot (Do not use this for initdefault!)
Example
Switch to xdm command : init 5
Switch to runlevel 3
command : init 3
NAME
init, telinit - process control initialization
SYNOPSIS
/sbin/init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ]
/sbin/telinit [ -t sec ] [ 0123456sSQqabcUu ]
DESCRIPTIONInit is the parent of all processes. Its primary role is to create processes from a script stored in the file /etc/inittab (see inittab(5)). This file usually has entries which cause init to spawn gettys on each line that users can log in. It also controls autonomous processes required by any particular system.....TELINIT
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action. The following arguments serve as
directives to telinit:
0,1,2,3,4,5 or 6
tell init to switch to the specified run level.
a,b,c tell init to process only those /etc/inittab file entries having runlevel a,b or c.
Q or q tell init to re-examine the /etc/inittab file.
S or s tell init to switch to single user mode.
U or u tell init to re-execute itself (preserving the state). No re-examining of /etc/inittab file happens. Run level should be one of Ss12345, otherwise request would be silently ignored.
telinit can also tell init how long it should wait between sending processes the SIGTERM and SIGKILL signals. The default is 5 seconds, but this can be changed with the -t sec option.
telinit can be invoked only by users with appropriate privileges.
The init binary checks if it is init or telinit by looking at its process id; the real init's process id is always 1. From this it follows that instead of call-ing telinit one can also just use init instead as a shortcut.
Related# runlevel 0 is System halt (Do not use this for initdefault!)
# runlevel 1 is Single user mode
# runlevel 2 is Local multiuser without remote network (e.g. NFS)
# runlevel 3 is Full multiuser with network
# runlevel 4 is Not used
# runlevel 5 is Full multiuser with network and xdm
# runlevel 6 is System reboot (Do not use this for initdefault!)
Example
Switch to xdm command : init 5
Switch to runlevel 3
command : init 3
相关文章推荐
- Linux shutdown和Init的命令区别,以及计算带宽
- vmware 安装honeywall 出现INIT: Id “X” respawning too fast 或者menu命令不识别等问题
- init命令
- linux常用关机命令shutdown、halt、poweroff、init用法
- 输入这个命令时:repo init -u git://android.git.kernel.org/platform/manifest.git报错 解决方法
- 除了/etc/init.d/加启动脚本 或者在/etc/rc.local中加启动命令,还可以通过crontab来完成服务器重启后自动启动服务的操作
- linux相关的关机命令shutdown、halt、poweroff、init
- Linux 使用init命令实现关机,重启,切换模式
- Linux/Unix关机、重启(shutdown\reboot\halt\init)等命令
- Android init.rc 文件支持的命令
- linux-init命令运行级别
- init.rc中getprop获取,setprop设置以及whatchprops命令
- 【命令init3/5】centos7切换图像界面和dos界面
- 两行命令从png制作启动界面initlogo.rle
- android init.rc命令快速对照表
- Git命令之git init
- git学习笔记(2)——git init命令选项说明
- Linux下virtualbox 升级后1908错误,sudo: /etc/init.d/vboxdrv:找不到命令
- 谈谈linux_init命令
- CentOS中service命令与/etc/init.d的关系以及centos7的变化