Книга: Fedora™ Unleashed, 2008 edition
Changing Runlevels
Changing Runlevels
After making changes to system services and runlevels, you can use the telinit
command to change runlevels on the fly on a running Fedora system. Changing runlevels this way enables system administrators to alter selected parts of a running system to make changes to the services or to put changes into effect that have already been made (such as reassignment of network addresses for a networking interface).
For example, a system administrator can quickly change the system to maintenance or single-user mode by using the telinit
command with its S option, like this:
# telinit S
The telinit
command uses the init
command to change runlevels and shut down currently running services. The command then starts services for the specified runlevel; in this example, the single-user runlevel is the same as runlevel 2. The init
command can be run only from a console, not from an xterm
running in an X session.
After booting to single-user mode, you can then return to multiuser mode without X, like this:
# telinit 3
If you have made changes to the system initialization table itself, /etc/inittab
, use the telinit
command's q
command-line option to force init
to re-examine the table.
TIP
Linux is full of shortcuts: If you exit the single-user shell by typing exit
at the prompt, you go back to the default runlevel without worrying about using telinit.
- Beginning the Boot Loading Process
- Loading the Linux Kernel
- System Services and Runlevels
- Runlevel Definitions
- Booting into the Default Runlevel
- Booting to a Nondefault Runlevel with GRUB
- Understanding init Scripts and the Final Stage of Initialization
- Controlling Services at Boot with Administrative Tools
- Running Services Through xinetd
- Changing Runlevels
- Changing Passwords in a Batch
- Temporarily Changing User Identity with the su Command
- System Services and Runlevels
- Changing Directories with cd
- Changing File Access Permissions with chmod
- Changing to NNRP Reader Mode
- Changing drive types
- Changing or deleting the volume label
- Changing shared folder settings
- Reviewing and changing template settings
- Setting a separator page and changing print device mode
- Changing the printer port