:


                             ""



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


    UNIX  -    .  
     .    
       
.    -    -
.        
      . 
 -  ,      
  -   .   -
      sy-
sadm(1M).      -
  .

        ,  
,     ,      
   .




           
  

        boot:

     ,   .
  ,  ,    , -
   <CR>.

       ,   -
      .    ,
    



         
   :

    a .

    f -.

    t .

    r .

_ unix, , -, , , -, , ( - ). boot: (, - , <CR>), . , <CR> - a:/unix, unix, . - - , . , , , . , - , -, . bo- ot(8) .
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) - . /etc/inittab - , init(1M) . init - inittab , , . inittab - , . : _ , . - /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.
/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, . shell- /etc/bcheckrc fsck(1M), - . . fsck - : . _ , - , /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.
, down , - root , /etc/shutdown , , Console login: sysadm reboot /etc/shutdown, . Shell- shutdown(1M) ( - S, ). , . - . shutdown : :

    -y . -

. , - 60 ; .
. - . , -g0 . _ init(1). - , . S. _ :

    0 ,

. , - . - shell- /etc/rc0.
, /etc/rc0. - S 1 , S - , init, , . 1 - , , - , - .

    6 .

down - /etc/shutdown -g0 .
Shell- finito(1M) - , - S. finito - ( ), init 6 /etc/inittab rb:6:wait:/etc/uadmin 2 2 >/dev/console 2>&1 6 - uadmin(1M) . uadmin , - , . , , - finito ( - shutdown). - sysadm(1M) shell- nuser(1M). Shell- nuser . - , , /udd/. ; . , sys , , people . , sys bson - , root. /etc/passwd . : . . . . . . , . /etc/passwd - . . , , - . , . , - shell - /bin/sh. /etc/ passwd : root:BuTHhcKTZvFt6:0:3:0000-Admin(0000):/: down::0:3:0000-Admin(0000):/:/etc/downshut sysadm::0:0:0000-Admin(0000):/usr/admin:/bin/rsh guest::100:13:USER:/usr/guest: userow:oVuwhC5zVY/ro:108:3:USER:/udd/userow: , 0, - root . guest userow - ; guest' . - guest 100, userow - 108. root, down userow 3. sy- sadm , guest - - 13. . - root down ; . sysadm - /usr/admin, guest - /usr/guest, userow - /udd/userow. root, guest userow shell ( ). down - , /etc/shutdown -g0 /etc/passwd , - . , sysadm shell, , , - . , - , down sysadm . , down, - . /etc/passwd . - , , , . /etc/group , : . . . lm ( ) , - newgrp. /etc/group: root::0:root sys::3:root,bin,sys,adm people::13: root, sys people, . , UNIX . root - 0, sys - 3, people - 13. , /etc/passwd, , guest people, userow - sys. , newgrp(1) root root, sys - root, bin, sys adm. people , . , (, guest) - people. , , /etc/inittab, getty(1M). - /dev, . /etc/gettydefs. , , , . getty /etc/issue, - . , getty login(1), . - , login , /etc/passwd. , - shell. shell , shell- ( ): /etc/profile $HOME/.profile, - HOME . /etc/profile , . : , , . /etc/profile: cat -s /etc/motd export TERM ta=`tty` ta=`grep "$ta " /etc/ttytype` TERM=`expr "$ta" : '.* \(.*\)' \| "$ta"` FP=m68881 export FP DBLALIGN=YES export DBLALIGN SHLIB=YES export SHLIB if [ -r /etc/addprofile ] then . /etc/addprofile fi /etc/motd - . - TERM. , tty(1) , . /etc/ttytype , . /etc/ttytype : /dev/tty1 vt100 /dev/tty3 d211 . . . /dev/tty10 vt52 . . . , . - expr(1) - TERM. , /etc/t- tytype. FP, DBLALIGN SHLIB C- cc(1). , - - 32- , - . , shell- /etc/addprofile, , - . shell- .profile - , . : export PATH PATH=${PATH}:/etc /.profile, root: set `who -r` if [ "$7" = "S" -a "$9" = "2" ] then /etc/finito fi , S root. shell- /.profile. , - finito(1M), - . , down . , -

    init S

. , /.profile S , , "$9" = "2" .
, UNIX, - /usr/src/uts. master(4) dfile(4), - . - make(1); /usr/src/uts - Makefile. , - /usr/include/sys/io.h, . /usr/include/sys/io.h - . 300 , : #define v_cdc300_0 0x0000,19, 0, 0, 0, 0, 3, 3, 3 #define v_cdc300_1 0x0010,19, 0, 0, 0, 0, 3, 3, 3 . . . #define l_cdc300_0 0,50000, 80000,220000, 50000,30000,\ 0,0, 0,0, 0,0, 0,0, 0,300000 #define l_cdc300_1 0,300000, 0,0, 0,0, 0,0, 0,0, 0,0,\ 0,0, 0,300000 0x0000 0x0010, . , - . #define - . - - . , hd0s0 50000 (50 ). hd0s1 80000 220 . hd0s2, - , ( ) - 30 . ( ) . - , : - 300 . hd1 - - hd1s0 300 . - , /usr/include/sys/io.h. io(4) . /usr/src/uts/master /usr/src/uts/dfile - UNIX. , - . , , - , . master , $ . , , . 1 ; 2 ; 3 . 4 5 - , MC680x0. difle - , master'. dfile - . . - - . - , . - . . 3 master 2 dfile. : , - dfile. .

    NBUF

/ ( 1 ). 10% .

    NPROC

.

    MAXUP

, - , - .

    NOFILES

.

    ULIMIT

( 1 ), .

    MSGMNI

.

    MSGMNB

( ).

    MSGMAX

.

    SEMMNI

.

    SEMMNS

.

    SEMMSL

.

    SHMMNI

.

    SHMMAX

( - ). - - , - dfile. master(4) dfile(4), .
, - make(1) Makefile /usr/src/uts. , , . , /usr/src/uts/master, /usr/src/uts/dfile /usr/include/ sys/io.h . UNIX root

    cd /usr/src/uts

    make unix

/usr/src/uts unix - - . , make . , boot:

    a:/usr/src/uts/unix

( <CR> ). , root, /usr/src/uts

    make install

: mv /unix /unixold mv unix / /unixold, - . . , - , . , , - /unix, [, ps(1)] . , /unix, ps . , /unixold /unix. UNIX mkuts(8) .
- . ( ), , . - UNIX - , , . - UNIX - root

    /etc/mkmini fd

mkmini(1M) shell. - . mkmini -, - . - (800 ) - - 30 . , dd if=/dev/rdsk/fd of=/dev/mt bs=256k .
: - . hd0s0 mount /dev/dsk/hd0s0 /mnt , - . cd /mnt find . -print | cpio -omv | strout /etc/strout 256 . - . : - . hd0s0 mount /dev/dsk/hd0s0 /mnt . cd /mnt dd if=/dev/mt bs=256k | cpio -idmvu . , cpio(1) , - . hd0s0 , fsck /dev/dsk/hd0s0 . fsck - , hd0s0 mkfs /dev/dsk/hd0s0 50000 1 216 - . - backup(8) . , , shell- copall(1) restall(1). - sysadm(1M). :

    diskmgmt -

- . - , - . - .

    filemgmt -

, , . - .

    machinemgmt -

- , - , .

    packagemgmt -

, - , .

    softwaremgmt -

- , - .

    syssetup -

, - , , , .. - .

    ttymgmt -

    usermgmt -

- , . sysadm - - . sy- sadm 20 - . - , .
.

    /.profile

root'; , .

    /bin -

.

    /dev .

    /dss

(). . delo .

    /etc :

TIMEZONE , . addprofile Shell-, . - , . checklist - . fstab . gettydefs , - getty. group . init.d - . inittab init. issue , - . magic " ". . mnttab ; . motd , . passwd . profile Shell-, . rcn.d - , n. termcap . - . ttytype . wtmp - . - , .

    /install

, - sysadm.

    /lib ,

.

    /lost+found

, - , .

    /mnt "" -

.

    /shlib

.

    /tmp ;

.

    /udd .

    /unix

- UNIX.

    /usr , ,

. adm . , pacct - . , - ; , , . bin - . binb . include . lib ( - ). terminfo - . acct - ; holi- days . mail [. mail(1) ma- ilx(1)]. news [. news(1)]. spool (, - ). cron/crontabs - [. cron(1)]. src - . tmp . - . .

    /util

, .
, . , ( ). : bcheckrc, brc(1M), getty(1M), init(1M), rc2(1M). : finito(1M), rc0(1M), shutdown(1M). UNIX: add(1M), addconf, addkern(1M), config(1M). : crash(1M), fsdb(1M). : acctcms(1M), acctcon1, acctcon2, acctdisk, acctdusg, acct- merg(1M), accton, acctprc1, acctprc2, acctwtmp, chargefee, ckpacct, diskusg(1M), dodisk, errdead(1M), errdemon(1M), errpt(1M), errstop(1M), fwtmp(1M), lastlogin, monacct, nulladm, prctmp, prdaily, prfdc, prfld, prfpr, prfsnap, prfstat, prtacct, runacct(1M), sa1, sa2, sadc, shutacct, startup, stra- ce(1M), strclean(1M), strerr(1M), turnacct, wtmpfix. : bcopy(1M), copyto, dcopy(1M), download(1M), finc(1M), frec(1M), fscv(1M), link(1M), mvdir(1M), saveto(1M), unlink, volcopy(1M). : cleall(1M), clri(1M), dfsck, format(1M), fsck(1M), install(1M), labelit(1M), mkfs(1M), mkmini(1M), mknod(1M), mount(1M), moun- tall(1M), pitio(1M), setmnt(1M), swap(1M), sync(1M), tstmo- de(1M), umount, umountall. : devnm(1M), ff(1M), fsstat(1M), fstyp(1M), fuser(1M), ncheck(1M), volume(1M). : captoinfo(1M), infocmp(1M), tic(1M). : accept(1M), lpadmin(1M), lpmove, lpsched(1M), lpshut, reject. : chroot(1M), killall(1M). : grpck, nuser(1M), pwck(1M). : uucheck(1M), uucico(1M), uucleanup(1M), uugetty(1M), uusc- hed(1M), uutry(1M), uuxqt(1M). : helpadm(1M), sysadm(1M), uadmin(1M). accept - acctcms -

    -a .

    -p ,

.

    -o , -

.

    -c .

    -j ,

, "***other".

    -n -

.

    -s , -

acctcms.

    -t

tacct [. acct(4)]. acctcon1 -

    -p , -

.

    -t

, . acctcon2 -

    /usr/lib/acct/acctcon2

acctdisk -

    /usr/lib/acct/acctdisk

acctdusg -
acctmerg -

    -a

tacct.

    -i , -

tacct.

    -p .

    -t ,

.

    -u ,

.

    -v ,

. accton -
acctprc1 - acctprc2 -

    /usr/lib/acct/acctprc2

acctwtmp -
add - UNIX [-t _] [-s __] [-l] _ ... addconf - addkern [dfile_]

    -t -

. addkern - UNIX
[-f ] [-l]

    -l -

addkern. bcheckrc -

    /etc/bcheckrc

bcopy -

    /etc/bcopy

brc -

    /etc/brc

captoinfo - termcap terminfo

    -v

. -v .
toinfo .

    -1 .

chargefee -
chroot - ckpacct - /usr/adm/pacct cleall -

    cleall

clri -
config - UNIX- [dfile_]

    -t -

. copyto -
crash - [-w _] dcopy - [-f __[:__]] __ __

    -d .

    -v , ,

, . devnm -
dfsck - - [__2] __2 ... diskusg - [-p ____] [-u _] [ ...] , diskusg.

    -v ,

. dodisk -

    -o -

- . download -
[-s __] _ _ errdead - errdemon - errpt -

    -a .

    -f

. errstop -
ff - [-c ] [-n ] [-i __] _

    -I .

    -l ,

.

    -s .

    -u .

finc -
finito -

    /etc/finito

format -
frec - , _: ... fsck - [-S[___:]] [-t ] [-q] [-D] [-f] [_ ...]

    -y ,

.

    -n ,

. .

    -q -

, .

    -D .

    -f .

(1 ) (5 - ).

    -b ,

. fscv - MC680x0 VAX-11/780
[__]

    -v MC680x0

VAX.

    -m VAX

MC680x0. fsdb -

    -

. fsstat -
fstyp - fuser - ,

    -u

( ).

    - .

fwtmp - /

    -ic -

. getty - ,
[ [_ [___]]]

    -h -

. grpck -
helpadm -

    /etc/helpadm

infocmp - , terminfo
[-w ] [-A ] [-B ] [ ...] .

    -c ,

.

    -n ,

.

    -L , -

.
.

    -s

, : d , - terminfo; i terminfo-; l C-; c termcap-.

    -v .

    -V .

    -1 .

init -
install - [-m _] [-u ] [-g ] [-o] [-s] [ ...]

    -i .

    -s ,

. killall -
labelit -

    -n .

. lastlogin -

    /usr/lib/acct/lastlogin

link -
lpadmin - [-i] [-l] [-m] [-r] [-v]]] [-x] [-d[]]

    -h .

    -l -.

lpmove -
lpsched -

    /usr/lib/lpsched

lpshut -

    /usr/lib/lpshut

mkfs -
[] [ ___] mkmini - , UNIX mknod -

    b .

    c .

    p .

monacct -
mount -

    -r .

    -d .

mountall -

    -

. mvdir -
ncheck -

    -s

. nulladm -
nuser - ߴ

    /etc/nuser

pitio -

    -r .

prctmp - prdaily -

    -l .

    -c .

prfdc - UNIX
prfld - UNIX prfpr - UNIX [____]] prfsnap - UNIX prfstat -

    /etc/prfstat on

    /etc/prfstat off

prtacct - tacct
pwck - rc0 -

    /etc/rc0

rc2 -

    /etc/rc2

reject -
runacct - sa1 - sa2 - [-s ] [-e ] [-i ]

    -u .

    -b .

    -d .

    -y .

    -c .

    -w .

    -a .

    -q .

    -v , , , .

    -m .

sadc - saveto - setmnt -

    /etc/setmnt

shutacct -
shutdown - , ߴ

    -y .

startup -

    /usr/lib/acct/startup

strace -
strclean - strerr -

    strerr

swap -
[-d _] [-l]

    -l .

sync -

    sync

sysadm -
tic - terminfo tstmode - turnacct - uadmin - ߴ umount -

    -d .

umountall -

    -k , ,

SIGKILL. unlink -
uucheck - uucp Permissions. uucico - uucp [-d _] -s uucleanup - [-m _] [-o ] [-s ] [-x _] uugetty - [ [_ [___]]]

    -h -

.

    -r .

uusched - uucp
Uutry -

    -r .

uuxqt -
volcopy - _ _1 _ _2

    -a .

    -s "DEL

if wrong". volume -

    -u .

    -t .

    -s .

    -h .

    -c .

    -l -

. wtmpfix - / /usr/lib/acct/wtmpfix [ ...]

Last-modified: Tue, 25 Nov 1997 06:59:54 GMT
: