Linux command
sulogin 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Start
sudo sulogin
Start
sudo sulogin [/dev/ttyX]
Set
sudo sulogin -t [timeout]
Start
sudo sulogin -p
Force
sudo sulogin -e
说明
sulogin is invoked by init when the system enters single-user mode. It prompts for the root password and starts a root shell. This is used for system maintenance and recovery. The command is typically called automatically during boot when entering single-user or rescue mode. It provides secure access to the system when normal multi-user services are not running.
参数
- -t, --timeout _seconds_
- Maximum time to wait for password before continuing boot
- -p, --login-shell
- Start the shell as a login shell
- -e, --force
- Examine default password files and skip prompt if root has no password
- -h, --help
- Display help information
- -V, --version
- Display version information
FAQ
What is the sulogin command used for?
sulogin is invoked by init when the system enters single-user mode. It prompts for the root password and starts a root shell. This is used for system maintenance and recovery. The command is typically called automatically during boot when entering single-user or rescue mode. It provides secure access to the system when normal multi-user services are not running.
How do I run a basic sulogin example?
Run `sudo sulogin` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -t, --timeout _seconds_ do in sulogin?
Maximum time to wait for password before continuing boot