multiple ways to reboot a system
# reboot # shutdown -r now # sudo init 6 # telinit 6 # shutdown -r +3 reboot after 3 minutes # shutdown -r 10:35 reboot at 10:35
Multiple ways to shutdown a system
# shutdown -h now # sudo init 0 # sudo telinit 0 # poweroff
Boot Process
BIOS
BootLoader(GRUB)
Kernel boot process
Last stages of startup
Runlevels
0, shutdown
1, single: Maintenance level
2. level without some network resources(for example lack of NFS)
3. Multi-user level without graphical interface
4. None
5. Multi-user level with graphical interface
6. reboot
to check current run level
runlevel
to change current run level
# init x # telinit x
Boot into different run level at boot time
Press the letter i when you see the bootloader. At the grub menu press the a key to append an argument to the kernel boot line. Enter argument at the end of the parameter, then press enter.
upstart
init
rcs.conf
rc.sysinit
Plymouth
provides the progress bar that we see during system bootup
inittab
rc.conf
some important startup scripts
/etc/rc.d/rcx.d
check which scripts are run in different run level. Replace x for 0 - 6
K vs S before service startup scripts
K is for kill and the S is for start
chkconfig
use chkconfig to start or kill services at startup # chkconfig servicename on # chkconfig servicename off # chkconfig --list servicename check if service name is on or off # chkconfig --level 35 atd on allow a service to start at specific runlevel(3,5)
Cancel schedule shutdown
shutdown -c
top command
display an instantaneous image of a server’s activity