System
|
|
State
|
Description
|
0
|
Shutdown state.
In this state, you can safely turn off the computer's power.
|
1
|
Administrative state.
Filesystems required for multiuser operations
are mounted, and logins requiring
access to multiuser filesystems can be used.
When the system comes up from firmware mode (state 5)
into state 1, only the console is active;
multiuser (state 2) services are unavailable.
When the system is going from state 2 to state 1,
some services are stopped and some processes are killed;
otherwise, the system continues operating
as it did in state 2.
|
s or S
|
Enter single-user state.
When the system changes to this state
as the result of a command,
the terminal from which the command was executed
becomes the system console.
(The terminal device is linked to /dev/syscon.)
This is the only system state
that does not require the existence of
a properly formatted inittab file.
If this file does not exist,
then by default, the only legal system state that
init can enter is the single-user state.
The set of filesystems mounted
and the list of processes killed
when a system enters state s
are not always the same;
which filesystems are mounted
and which processes are killed
depends on the method used for putting the
system into state s
and the rules in force at your computer site.
The following paragraphs describe
state s in three circumstances: when
the system is brought up to s with init;
when the system is brought down (from another state)
to s with init;
and when the system is brought down to s
with shutdown.
When the system is brought up to s with init,
the only filesystems mounted are
/ (root), /var, and /stand.
(Two filesystem types,
/proc and /dev/fd,
are also mounted.)
Filesystems for users' files are not mounted.
With the commands available on the mounted filesystems,
you can manipulate the filesystems
or transition to other system states.
Only essential kernel processes are kept running.
When the system is brought down to s with init,
all mounted filesystems remain mounted
and all processes started by init
that should be running only in multiuser state are killed.
Because all login-related processes are killed,
users cannot access the system while it is in this state.
In addition, any process for which
the utmp file has an entry will be killed.
This last condition ensures that
all port monitors started by
the SAC
will be killed
and all services started by these port monitors,
including ttymon login services, will be killed.
(The SAC is a daemon that
maintains the port monitors on a server computer
in the state specified by the system administrator.)
Other processes not started directly by init
(such as cron) remain running.
When you change to s with shutdown,
the system is restored to the state in which
it was running when you first booted the computer
and came up in single-user state,
as described above.
|
2
|
Multiuser state.
In this state,
filesystems are mounted
and multiuser services are started.
Multiuser is the default state upon powerup if the
NFS package has not been installed.
|
3
|
Networking state.
Used to start the
Network Filesystem (NFS),
mount remote resources,
and offer your resources automatically.
Networking is the default state upon powerup if the NFS package
has been installed.
Even if the Unlimited User Upgrade package is
not installed on your computer, the system will initialize to
state 3 by default and will allow up to two users.
|
5
|
Firmware state.
For the Intel386 family of processors,
init 5 or shutdown -i5 only brings
the computer to the shutdown state (state 0).
Refer to your computer manufacturer's documentation for information
on how to access the firmware (BIOS) for your computer.
|
6
|
Stop and reboot the operating system
to the state defined by the
initdefault
entry in
/etc/inittab.
If necessary,
configure a new bootable operating system
before the reboot.
(The rc6 procedure is invoked for this.)
|
Q or q
|
Re-examine the /etc/inittab file.
|
As delivered, the system
enters the default system state on powerup.
Filesystems are mounted, daemons started,
and system services are made available.
These activities are performed by
the
rc2(1M)
script.
Networking is started by the
rc3(1M)
script.