Unix   ""    1. 2 2. 3 2.1. 3 2.2. init. 4 2.3. /etc/inittab 5 2.4. 7 2.5. 9 3. 12 3.1. /etc/shutdown 12 3.2. /etc/finito 13 4. 14 4.1. /etc/nuser 14 4.2. /etc/passwd /etc/group 14 5. 17 5.1. /etc/profile 17 5.2. .profile 18 6. UNIX 20 6.1. io.h, master dfile 20 6.2. 22 7. 24 7.1. - 24 7.2. 24 8. 27 A. 29 B. UNIX 33 C. 35  1.  UNIX - . . . - - . . - , - . - sy- sadm(1M). - . , , , .  2.   2.1.  boot: , . , , , - <CR>. , - . , :_  : a . f -. t . r . _ unix, , -, , , -, , ( - ). boot: (, - , <CR>), . , <CR> - a:/unix, unix, . - - , . , , , . , - , -, . bo- ot(8) .  2.2. init.  UNIX init - . - - , - /etc/inittab [. inittab(4)]. init - , . init -  . , - . , init' , /etc/inittab. 0 6 S. , - . - , root. - , (, ) - . - - S. 2 . , . 6 - . . , 3 , . init /etc/inittab - , - , init'. /etc/inittab , - /etc/init q init init(1M) - .  2.3. /etc/inittab /etc/inittab - , init(1M) . init - inittab , , . inittab - , . : :_:initdefault: _ , . - /etc/inittab , , , : is:2:initdefault: /etc/inittab is:S:initdefault: - . inittab : :_:: .  . _ ,  . , , .  , - . init : bootwait init - . ( - initdefault 2, ). init , . wait _, , . inittab - . respawn  , , ( init- tab), . , inittab. off , , , SIGTERM 20 , SIG- KILL. , - . powerfail  init' .  shell', - . , - ;#. respawn getty(1M), . - - ( ), respawn off. , - , off respawn. - , init' - /etc/inittab /etc/init q , - - - /etc/ inittab.  2.4.  /etc/inittab, : is:2:initdefault: bc:2345:bootwait:/etc/bcheckrc /dev/console 2>&1 br::bootwait:/etc/brc >/dev/console 2>&1 r0:0:wait:/etc/rc0 >/dev/console 2>&1 r2:2:wait:/etc/rc2 >/dev/console 2>&1 co::respawn:/etc/getty console console 03::off:/etc/getty tty3 9600A 04::respawn:/etc/getty tty4 9600A init - 2. bc - . - shell- /etc/bcheckrc , . /etc/bcheckrc init shell- /etc/brc , - . , _-  . r0 , , - ; /etc/rc2. shell : set `who -r` if [ $9 = "S" ] then echo "The system is coming up. Please wait." elif [ -d /etc/rc2.d ] then for f in /etc/rc2.d/K* do if [ -s ${f} ] then /bin/sh ${f} stop fi done fi if [ -d /etc/rc2.d ] then for f in /etc/rc2.d/S* do if [ -s ${f} ] then /bin/sh ${f} start fi done fi if [ $9 = "S" ] then echo "\n ****** MULTI-USER MODE `/bin/date` ****** \n" fi , who -r - , . , - . S, - ($9 = "S") - , . 2 - , /etc/ rc2.d, K. - , 2; stop. , start , S. - , , - .. , / , . /etc/init.d (- , MOUNTFSYS lineprinter). /etc/rcn.d (n - ) /etc/init.d [KS]??__/etc/init.d - K S - , : . . , shell . , . , /etc/rc2.d S03MOUNTFSYS S04RMTMPFILES. , , - . ( S80errlog) . - . - - , - , , K S. (k s) - . /etc/inittab. /etc/rc2 init . getty(1M), - co, , respawn. getty - ( - ), ( get- ty) . /etc/inittab , off. - 04 co. init - , /etc/init- tab, .  2.5.  shell- /etc/bcheckrc fsck(1M), - . . fsck - : /etc/fsck [-y] [-n] [_ ...] . _ , - , /etc/ checklist. . (yes) . : -y , . -n , . . fsck . -y - . : / . , , - . . : ; 16. , . . : , - ; . : 65536; , - , . . - / . , , ( - ) lost+found. -n, . lost+found , - . , fsck /lost+found, - , . /etc/check- list - : /dev/dsk/hd0s0 /dev/dsk/hd0s1 UNIX. , . - UNIX , - /etc/fsck -y /dev/dsk/fd . , , fsck . /dev/console; , UNIX . - - - /etc/fsck -y /dev/dsk/hd0s0 /dev/console , fsck . , UNIX , - , - /dev/dsk/hd0s0.  3.  , down , - root , /etc/shutdown , , Console login: sysadm reboot /etc/shutdown, .  3.1. /etc/shutdown Shell- shutdown(1M) ( - S, ). , . - . shutdown : /etc/shutdown [-y] [-g] [-i_] : -y . - . , - 60 ; . -g . - . , -g0 . -i_ _ init(1). - , . S. _ : 0 , . , - . - shell- /etc/rc0. 1, s, S , /etc/rc0. - S 1 , S - , init, , . 1 - , , - , - . 6 . down - /etc/shutdown -g0 .  3.2. /etc/finito Shell- finito(1M) - , - S. finito - ( ), init 6 /etc/inittab rb:6:wait:/etc/uadmin 2 2 >/dev/console 2>&1