JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

6to4relay(1M)

acct(1M)

acctadm(1M)

acctcms(1M)

acctcon1(1M)

acctcon(1M)

acctcon2(1M)

acctdisk(1M)

acctdusg(1M)

acctmerg(1M)

accton(1M)

acctprc1(1M)

acctprc(1M)

acctprc2(1M)

acctsh(1M)

acctwtmp(1M)

acpihpd(1M)

adbgen(1M)

add_allocatable(1M)

addbadsec(1M)

add_drv(1M)

aimanifest(1M)

arp(1M)

asradm(1M)

asr-notify(1M)

atohexlabel(1M)

audit(1M)

auditconfig(1M)

auditd(1M)

auditrecord(1M)

auditreduce(1M)

auditstat(1M)

audit_warn(1M)

automount(1M)

automountd(1M)

autopush(1M)

bart(1M)

beadm(1M)

boot(1M)

bootadm(1M)

bootconfchk(1M)

bootparamd(1M)

busstat(1M)

captoinfo(1M)

catman(1M)

cfgadm(1M)

cfgadm_ac(1M)

cfgadm_cardbus(1M)

cfgadm_fp(1M)

cfgadm_ib(1M)

cfgadm_pci(1M)

cfgadm_sata(1M)

cfgadm_sbd(1M)

cfgadm_scsi(1M)

cfgadm_sdcard(1M)

cfgadm_shp(1M)

cfgadm_sysctrl(1M)

cfgadm_usb(1M)

chargefee(1M)

chat(1M)

check-hostname(1M)

check-permissions(1M)

chk_encodings(1M)

chroot(1M)

cimworkshop(1M)

ckpacct(1M)

clear_locks(1M)

clinfo(1M)

closewtmp(1M)

clri(1M)

comsat(1M)

configCCR(1M)

consadm(1m)

console-reset(1M)

coreadm(1M)

cpustat(1M)

croinfo(1M)

cron(1M)

cryptoadm(1M)

datadm(1M)

dcopy(1M)

dcs(1M)

dd(1M)

ddu(1M)

ddu-text(1M)

devchassisd(1M)

devfsadm(1M)

devfsadmd(1M)

device_allocate(1M)

device_remap(1M)

devinfo(1M)

devlinks(1M)

devnm(1M)

devprop(1M)

df(1M)

dfmounts(1M)

dfmounts_nfs(1M)

dfshares(1M)

dfshares_nfs(1M)

df_ufs(1M)

dhcpagent(1M)

dhcpconfig(1M)

dhcpmgr(1M)

dhtadm(1M)

dig(1M)

directoryserver(1M)

diskinfo(1M)

disks(1M)

diskscan(1M)

dispadmin(1M)

distro_const(1M)

dladm(1M)

dlmgmtd(1M)

dlstat(1M)

dmesg(1M)

dminfo(1M)

dns-sd(1M)

dnssec-dsfromkey(1M)

dnssec-keyfromlabel(1M)

dnssec-keygen(1M)

dnssec-makekeyset(1M)

dnssec-signkey(1M)

dnssec-signzone(1M)

dodisk(1M)

domainname(1M)

drd(1M)

drvconfig(1M)

dsbitmap(1M)

dscfg(1M)

dscfgadm(1M)

dscfglockd(1M)

dsstat(1M)

dsvclockd(1M)

dtrace(1M)

dumpadm(1M)

editmap(1M)

edquota(1M)

eeprom(1M)

efdaemon(1M)

embedded_su(1M)

emCCR(1M)

emocmrsp(1M)

etrn(1M)

fbconfig(1M)

fbconf_xorg(1M)

fcadm(1M)

fcinfo(1M)

fdetach(1M)

fdisk(1M)

ff(1M)

ff_ufs(1M)

fingerd(1M)

fiocompress(1M)

flowadm(1M)

flowstat(1M)

fmadm(1M)

fmd(1M)

fmdump(1M)

fmstat(1M)

fmthard(1M)

format(1M)

fruadm(1M)

fsck(1M)

fsck_pcfs(1M)

fsck_udfs(1M)

fsck_ufs(1M)

fsdb(1M)

fsdb_udfs(1M)

fsdb_ufs(1M)

fsflush(1M)

fsirand(1M)

fssnap(1M)

fssnap_ufs(1M)

fsstat(1M)

fstyp(1M)

fuser(1M)

fwflash(1M)

fwtmp(1M)

getdevpolicy(1M)

getent(1M)

gettable(1M)

getty(1M)

gkadmin(1M)

groupadd(1M)

groupdel(1M)

groupmod(1M)

growfs(1M)

grpck(1M)

gsscred(1M)

gssd(1M)

hald(1M)

hal-device(1M)

hal-fdi-validate(1M)

hal-find(1M)

hal-find-by-capability(1M)

hal-find-by-property(1M)

hal-get-property(1M)

hal-set-property(1M)

halt(1M)

hextoalabel(1M)

host(1M)

hostconfig(1M)

hotplug(1M)

hotplugd(1M)

htable(1M)

ickey(1M)

id(1M)

idmap(1M)

idmapd(1M)

idsconfig(1M)

ifconfig(1M)

if_mpadm(1M)

ifparse(1M)

iiadm(1M)

iicpbmp(1M)

iicpshd(1M)

ikeadm(1M)

ikecert(1M)

ilbadm(1M)

ilbd(1M)

ilomconfig(1M)

imqadmin(1M)

imqbrokerd(1M)

imqcmd(1M)

imqdbmgr(1M)

imqkeytool(1M)

imqobjmgr(1M)

imqusermgr(1M)

in.chargend(1M)

in.comsat(1M)

in.daytimed(1M)

in.dhcpd(1M)

in.discardd(1M)

in.echod(1M)

inetadm(1M)

inetconv(1M)

inetd(1M)

in.fingerd(1M)

infocmp(1M)

in.iked(1M)

init(1M)

init.sma(1M)

init.wbem(1M)

inityp2l(1M)

in.lpd(1M)

in.mpathd(1M)

in.named(1M)

in.ndpd(1M)

in.rarpd(1M)

in.rdisc(1M)

in.rexecd(1M)

in.ripngd(1M)

in.rlogind(1M)

in.routed(1M)

in.rshd(1M)

in.rwhod(1M)

install(1M)

installadm(1M)

installboot(1M)

installf(1M)

installgrub(1M)

in.stdiscover(1M)

in.stlisten(1M)

in.talkd(1M)

in.telnetd(1M)

in.tftpd(1M)

in.timed(1M)

intrd(1M)

intrstat(1M)

in.uucpd(1M)

iostat(1M)

ipaddrsel(1M)

ipadm(1M)

ipf(1M)

ipfs(1M)

ipfstat(1M)

ipmgmtd(1M)

ipmon(1M)

ipmpstat(1M)

ipnat(1M)

ippool(1M)

ipqosconf(1M)

ipsecalgs(1M)

ipsecconf(1M)

ipseckey(1M)

iscsiadm(1M)

isns(1M)

isnsadm(1M)

itadm(1M)

itu(1M)

js2ai(1M)

k5srvutil(1M)

kadb(1M)

kadmin(1M)

kadmind(1M)

kadmin.local(1M)

kcfd(1M)

kclient(1M)

kdb5_ldap_util(1M)

kdb5_util(1M)

kdcmgr(1M)

kernel(1M)

keyserv(1M)

killall(1M)

kmem_task(1M)

kmscfg(1M)

kprop(1M)

kpropd(1M)

kproplog(1M)

krb5kdc(1M)

ksslcfg(1M)

kstat(1M)

ktkt_warnd(1M)

labeld(1M)

labelit(1M)

labelit_hsfs(1M)

labelit_udfs(1M)

labelit_ufs(1M)

lastlogin(1M)

latencytop(1M)

ldapaddent(1M)

ldap_cachemgr(1M)

ldapclient(1M)

ldmad(1M)

link(1M)

llc2_loop(1M)

lldpadm(1M)

lldpd(1M)

lms(1M)

locator(1M)

lockd(1M)

lockfs(1M)

lockstat(1M)

lofiadm(1M)

logadm(1M)

logins(1M)

lshal(1M)

System Administration Commands - Part 2

System Administration Commands - Part 3

init

- process control initialization

Synopsis

/usr/sbin/init [0123456abcQqSs]

Description

init is the default primordial user process. (Options given to the kernel during boot may result in the invocation of an alternative primordial user process, as described on kernel(1M)). init initiates the core components of the service management facility, svc.configd(1M) and svc.startd(1M), and restarts these components if they fail. For backwards compatibility, init also starts and restarts general processes according to /etc/inittab, as desribed below.

The run levels and system booting descriptions given below are provided for compatibility purposes only, and otherwise made obsolete by the service management facility, smf(5).

init Failure

If init exits for any reason other than system shutdown, it will be restarted with process-ID 1.

Run Level Defined

At any given time, the system is in one of eight possible run levels. A run level is a software configuration under which only a selected group of processes exists. Processes spawned by init for each of these run levels are defined in /etc/inittab. init can be in one of eight run levels, 0-6 and S or s (S and s are identical). The run level changes when a privileged user runs /usr/sbin/init.

init and System Booting

When the system is booted, init is invoked and the following occurs. First, it reads the properties for the svc:/system/environment:init service. Among these properties are values for locale-related environments, such as LANG or LC_CTYPE. init then looks in /etc/inittab for the initdefault entry (see inittab(4)). If the initdefault entry:

exists

init usually uses the run level specified in that entry as the initial run level to enter only if the options/milestone property has not been specified for svc.startd(1M).

does not exist

The service management facility, smf(5), examines its configuration specified in svc.startd(1M), and enters the milestone specified by the options/milestone property.

The initdefault entry in /etc/inittab corresponds to the following run levels:

S or s

init goes to the single-user state. In this state, the system console device (/dev/console) is opened for reading and writing and the command /usr/sbin/su, (see su(1M)), is invoked. Use init to change the run level of the system. Note that if the shell is terminated (using an end-of-file), init only re-initializes to the single-user state if /etc/inittab does not exist.

0-6

init enters the corresponding run level. Run levels 0, 5, and 6 are reserved states for shutting the system down. Run levels 2, 3, and 4 are available as multi-user operating states.

If this is the first time since power up that init has entered a run level other than single-user state, init first scans /etc/inittab for boot and bootwait entries (see inittab(4)). These entries are performed before any other processing of /etc/inittab takes place, providing that the run level entered matches that of the entry. In this way any special initialization of the operating system, such as mounting file systems, can take place before users are allowed onto the system. init then scans /etc/inittab and executes all other entries that are to be processed for that run level.

To spawn each process in /etc/inittab, init reads each entry and for each entry that should be respawned, it forks a child process. After it has spawned all of the processes specified by /etc/inittab, init waits for one of its descendant processes to die, a powerfail signal, or a signal from another init process to change the system's run level. When one of these conditions occurs, init re-examines /etc/inittab.

inittab Additions

New entries can be added to /etc/inittab at any time; however, init still waits for one of the above three conditions to occur before re-examining /etc/inittab. To get around this, init Q or init q command wakes init to re-examine /etc/inittab immediately.

When init comes up at boot time and whenever the system changes from the single-user state to another run state, init sets the ioctl(2) states of the console to those modes saved in the file /etc/ioctl.syscon. init writes this file whenever the single-user state is entered.

Run Level Changes

When a run level change request is made, init or a designate sends the warning signal (SIGTERM) to all processes that are undefined in the target run level. A minimum interval of five seconds is observed before init or its designate forcibly terminates these processes by sending a kill signal (SIGKILL). Additionally, init informs svc.startd(1M) that the run level is changing. svc.startd(1M) then restricts the system to the set of services which the milestone corresponding to the run-level change depends on.

When init receives a signal telling it that a process it spawned has died, it records the fact and the reason it died in /var/adm/utmpx and /var/adm/wtmpx if it exists (see who(1)). A history of the processes spawned is kept in /var/adm/wtmpx.

If init receives a powerfail signal (SIGPWR) it scans /etc/inittab for special entries of the type powerfail and powerwait. These entries are invoked (if the run levels permit) before any further processing takes place. In this way init can perform various cleanup and recording functions during the powerdown of the operating system.

Setting Environment Variables

You can set default values for environment variables, for such items as timezone and character formatting, in the list of properties for the svc:/system/environment:init service.

Security

init uses pam(3PAM) for session management. The PAM configuration policy, configured in either /etc/pam.conf or per-service files in /etc/pam.d/, specifies the session management module to be used for init. Here is a partial pam.conf file with entries for init using the UNIX session management module.

init   session   required    pam_unix_session.so.1

The equivalent PAM configuration using /etc/pam.d/ would be the following entry in /etc/pam.d/init:

session required    pam_unix_session.so.1

If there are no entries for the init service in /etc/pam.conf and no /etc/pam.d/init file exists, then the entries for the “other” service in /etc/pam.conf will be used. If there are not any entries in /etc/pam.conf for the “other” service, then the entries in /etc/pam.d/other will be used.

Options

0

Go into firmware.

1

Put the system in system administrator mode. All local file systems are mounted. Only a small set of essential kernel processes are left running. This mode is for administrative tasks such as installing optional utility packages. All files are accessible and no users are logged in on the system.

This request corresponds to a request for smf(5) to restrict the system milestone to svc:/milestone/single-user:default.

2

Put the system in multi-user mode. All multi-user environment terminal processes and daemons are spawned. This state is commonly referred to as the multi-user state.

This request corresponds to a request for smf(5) to restrict the system milestone to svc:/milestone/multi-user:default.

3

Extend multi-user mode by making local resources available over the network.

This request corresponds to a request for smf(5) to restrict the system milestone to svc:/milestone/multi-user-server:default.

4

Is available to be defined as an alternative multi-user environment configuration. It is not necessary for system operation and is usually not used.

5

Shut the machine down so that it is safe to remove the power. Have the machine remove power, if possible.

6

Stop the operating system and reboot to the state defined by the initdefault entry in /etc/inittab.

The service svc:/system/boot-config:default is enabled by default. When the config/fastreboot_default property is set to true, init 6 will bypass certain firmware initialization and test steps, depending on the specific capabilities of the system.

a,b,c

Process only those /etc/inittab entries having the a, b, or c run level set. These are pseudo-states, which may be defined to run certain commands, but which do not cause the current run level to change.

Q,q

Re-examine /etc/inittab.

S, s

Enter single-user mode. This is the only run level that doesn't require the existence of a properly formatted /etc/inittab file. If this file does not exist, then by default, the only legal run level that init can enter is the single-user mode. When in single-user mode, the filesystems required for basic system operation will be mounted. When the system comes down to single-user mode, these file systems will remain mounted (even if provided by a remote file server), and any other local filesystems will also be left mounted. During the transition down to single-user mode, all processes started by init or init.d scripts that should only be running in multi-user mode are killed. In addition, any process that has a utmpx entry will be killed. This last condition insures that all port monitors started by the SAC are killed and all services started by these port monitors, including ttymon login services, are killed.

This request corresponds to a request for smf(5) to restrict the system milestone to svc:/milestone/single-user:default.

Files

/dev/console

System console device.

/etc/default/init

This file is Obsolete and might be removed in a future release. Instead of obtaining values from this file, the init process reads properties for the svc:/system/environment:init service. To make changes that were formerly made by editing /etc/default/init, an administrator with the System Administrator or System Configuration rights profile can set the corresponding properties of the init service instance and refresh the instance.

This read-only file contains environment variables and their default values. The variables are:

TZ

Always set to localtime. To set the system timezone, an administrator must set the timezone/localtime property in timezone:default SMF service.

CMASK

The mask (see umask(1)) that init uses and that every process inherits from the init process. If not set, init uses the mask it inherits from the kernel. Note that init always attempts to apply a umask of 022 before creating a file, regardless of the setting of CMASK

LC_CTYPE

Character characterization information

LC_MESSAGES

Message translation

LC_MONETARY

Monetary formatting information

LC_NUMERIC

Numeric formatting information

LC_TIME

Time formatting information

LC_ALL

If set, all other LC_* environmental variables take-on this value.

LANG

If LC_ALL is not set, and any particular LC_* is also not set, the value of LANG is used for that particular environmental variable.

/etc/inittab

Controls process dispatching by init.

/etc/ioctl.syscon

ioctl states of the console, as saved by init when single-user state is entered.

/etc/svc/volatile/init.state

init state necessary to recover from failure.

/var/adm/utmpx

User access and administration information.

/var/adm/wtmpx

History of user access and administration information.

/var/run/initpipe

A named pipe used for internal communication.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os

See Also

login(1), sh(1), stty(1), who(1), kernel(1M), shutdown(1M), su(1M), svc.configd(1M), svc.startd(1M), ttymon(1M), ioctl(2), kill(2), ctime(3C), pam(3PAM), init.d(4), inittab(4), pam.conf(4), TIMEZONE(4), utmpx(4), attributes(5), pam_unix_session(5), smf(5), termio(7I)

Diagnostics

If init finds that it is respawning an entry from /etc/inittab more than ten times in two minutes, it assumes that there is an error in the command string in the entry and generates an error message on the system console. It then refuses to respawn this entry until either five minutes has elapsed or it receives a signal from a user-spawned init command. This prevents init from eating up system resources when someone makes a typographical error in the inittab file, or a program is removed that is referenced in /etc/inittab.

Notes

init can be run only by a privileged user.

The S or s state must not be used indiscriminately in /etc/inittab. When modifying this file, it is best to avoid adding this state to any line other than initdefault.

If a default state is not specified in the initdefault entry in /etc/inittab, state 6 is entered. Consequently, the system will loop by going to firmware and rebooting continuously.

If the utmpx file cannot be created when booting the system, the system will boot to state “s” regardless of the state specified in the initdefault entry in /etc/inittab. This can occur if the /var file system is not accessible.

When a system transitions down to the S or s state, the /etc/nologin file (see nologin(4)) is created. Upon subsequent transition to run level 2, this file is removed.

init uses /var/run/initpipe, a named pipe, for internal communication.