< Linux Administration < System Architecture 
 
 
        
      This lesson covers boot configuration.
Objectives and Skills
Objectives and skills for the boot sequence portion of Linux+ certification include:[1]
- Change runlevels/boot targets and shutdown or reboot system.
- Set the default runlevel or boot target
- Change between runlevels/boot targets including single user mode
- Shut down and reboot from the command line
- Alert users before switching runlevels/ boot targets or other major system events
- Properly terminate processes
- The following is a partial list of the used files, terms and utilities:
- /etc/inittab
- shutdown
- init
- /etc/init.d
- telinit
- system
- systemctl
- /etc/systemd/
- /usr/lib/system/
- wall
 
 
Readings
Multimedia
Activities
- Complete the tutorial IBM: Learn Linux, 101: Runlevels, boot targets, shutdown, and reboot
- Shutdown
- Use shutdownto shutdown the system.
- Use telinit 0to shutdown the system.
- Use systemctl isolate poweroff.targetto shutdown the system.
 
- Use 
- Reboot
- Use rebootto reboot the system.
- Use telinit 6to reboot the system.
- Use systemctl isolate reboot.targetto reboot the system.
- Use telinit 1to reboot the system in single-user mode.
- Use systemctl isolate rescue.targetto reboot the system in single-user mode.
 
- Use 
- Test the difference between haltandhalt -p.
- Set default runlevels.
- Use systemctl set-default multi-user.targetto configure multi-user mode. Reboot.
- Use systemctl set-default graphical.targetto configure graphical user mode. Reboot.
 
- Use 
- Review HowToForge: Linux wall Command Tutorial. Use wallto alert users of an impending reboot.
- Use killto stop processes.- Review Benjamin Cane: Understanding the kill command, and how to terminate processes in Linux.
- Run a user program, such as the calculator or an editor. Use ps -Ato find the program's process ID. Usekilland the process ID to ask the program to terminate itself.
- Run the program. Use ps -Ato find the program's process ID. Usekill -15and the process ID to ask the program to terminate itself.
- Run the program. Use ps -Ato find the program's process ID. Usekill -SIGTERMand the process ID to ask the program to terminate itself.
- Run the program. Use ps -Ato find the program's process ID. Usekill -9and the process ID to kill the process.
- Run the program. Use ps -Ato find the program's process ID. Usekill -SIGKILLand the process ID to kill the process.
 
- Stop and restart services.
- Review CyberCiti.biz: Service command.
- Use service --status-allto list service status.
- Use service cups stopto stop the printing service.
- Use service cups startto start the printing service.
- Use service cups restartto restart the printing service.
 
- Use 
Lesson Summary
- The haltcommand will halt, poweroff, or reboot the system:[2]- haltcommand stops CPU processing
- halt -pstops CPU processing and powers off a system
- halt --rebootreboots a system
 
- The killcommand is used to terminate processes without having to log out or reboot the computer.[3]- kill <pid>(SIGTERM, option 15) and signals the process to terminate itself
- kill -9 <pid>or- kill -SIGKILL <pid>kills the process
 
- The servicecommand is used to start, stop, and restart services.[4]
- The shutdowncommand turns off or reboots a computer.[5]- shutdown -h nowshuts down a system immediately
- shutdown -r nowreboots a system
 
- The systemctlcommand is used to examine and control the state of "systemd".[6]
- systemctlrunlevels include:[9]- 0 - poweroff.target
- 1 - rescue.target
- 3 - multi-user.target
- 5 - graphical.target
- 6 - reboot.target
 
- 0 - 
- The telinitcommand signalsinitto change runlevels. Runlevels include:[10]- 0 - halt
- 1 - single-user mode
- 6 - reboot
 
- The wallcommand (write to all) displays the contents of a file or standard input to all logged-in users.[11]
- /etc/init.dcontains start/stop scripts for system services.[12]
- /etc/inittabis the top-level configuration file for init.[13]
- /etc/systemd/contains local systemd configuration files.[14]
Key Terms
See Also
References
- ↑ CompTIA: Linux+ Certification Exam Objectives - Exam LX0-103
- ↑ Geeks for Geeks: halt, poweroff and reboot Commands in Linux
- ↑ Linux Information Project: The kill Command
- ↑ ComputerHope: Linux service command
- ↑ Wikipedia: Shutdown (computing)
- ↑ Geeks for Geeks: systemctl in Unix
- ↑ SysTutorials: How to Change Systemd Boot Target on Linux
- ↑ SysTutorials: How to Change Systemd Boot Target on Linux
- ↑ TecMint: How to Change Runlevels (targets) in SystemD
- ↑ ComputerHope: Linux init and telinit commands
- ↑ Wikipedia: wall (Unix)
- ↑ GHacks: Get To Know Linux: The /etc/init.d Directory
- ↑ Wikipedia: Linux startup process
- ↑ Wikipedia: systemd
    This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.