Startup & Shutdown
reboot
* Same as reboot but better
shutdown -i 6
* Fasthalt, for shutdown system with only a local users
shutdown -i 0
Run states
0 ready for power down
1 single-user
2 multiuser w/o netwking
3 multiuser w netwking
4 unused
5 interactive reboot
6 reboot
S singls-user startup
rc scripts
rc0 shuts down & start up so it’s safe to power off. Also shuts down services & daemons, killing running processes, & umount fs
rc1 bring system into single usr mode.Also shuts down services & daemons, killing running processes, & umount fs
rc2 starts multiusr op w/ netwking & nfs support. It also cleanup /tmp & /var/tmp, loads netwk interface, starts cron, lp & sendmail
rc3 starts multiusr mode. Executes tasks in run state 2 & starts NFS daemons
rc4 unused
rc5 starts interactive sw reboot. It prompts for an alternate boot dev
rc6 reboot system
rcS starts single usr state w/ rcs) some fs mounted
•ok prompt
banner, printenv, .speed, .version
set-defaults,test-all
probe-scsi
boot -r
boot -s //boot single user mode
power-off
Run OBDiag:
ok setenv diag-switch? true
ok setenv auto-boot? false
ok reset-all
Run POST
ok setenv diag-switch? true
ok setenv diag-level max
ok setenv diag-device disk
ok setenv auto-boot? false
ok reset-all
power cycle the system
use show-post-results to view results
ok devalias
Network setup:
sys-unconfig
/usr/sbin/ifconfig -a
ypwhich
ypcat hosts
ping->netstat -rn
•Print default routing table
netstat -rn
•Add default router
route add defauct 192.168.0.1 1
•Cron job
-Create/edit crontab file
crontab -e
-List crontab file
crontab -l
-Remove crontab file
crontab -r
min(0-59)
hr(0-23)
day of month(1-31)
month of yr(1-12)
day of wk(0-6 with 0=Sunday)
* = all possible values
fsck -y /dev/rdsk/c0t0d0s3