Friday, April 25, 2014

Operate running systems

Operate running systems

    Boot, reboot, and shut down a system normally.

Physically power on the system

You can shutdown a system with the following commands

Shutdown Commands
# shutdown -h +<time delay in minutes> ex: shutdown -h +5 (Shuts down system in 5 min
# shutdown -h now (shutdown immediately)
# poweroff
# init 0 (Switches to runlevel 0 which shutdown the system)
# halt

Reboots Commands
# reboot
# shutdown -r +<time delay in minutes>
# shutdown -r now
# init 6   //switches to runlevel 6 which reboots the system immediately



    Boot systems into different runlevels manually.

1) Boot your system and press any key within the allotted amount of time to get to the “Grub” bootloader screen.
2) Select your boot “OS” and press “a” to edit the boot command
3) Add the number of the runlevel you would like to use at the end of the command to boot to that runlevel
Example:

ro root=/dev/mapper/vg_centosvm-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_centosvm/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_centosvm/lv_root rd_NO_DM 1

The “1” at the end of the boot string will boot the system to runlevel 1



    Use single-user mode to gain access to a system.

Boot the system to runlevel 1 as shown above to gain super user (root) access in run level 1

No comments:

Post a Comment