Linux activation program

Source: Internet
Author: User
Article title: activation programs in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Linux activation
   
Linux Runlevel
  
7 RunLevel according to different requirements, Linux (UNIX) can be divided into seven different activation modes, or seven different execution levels. generally, a normal system is enabled as Level 3 or 5.
  
Run Level change root can use init or telinit to switch to different Run Levelinit 0 = shutdown-h init 6 = reboot
  
/Etc/inittab description/etc/inittab content (Just For RedHAT Linux) id: 3: initdefault: si: sysinit:/etc/rc. d/rc. sysinitl0: 0: wait:/etc/rc. d/rc 0l1: 1: wait:/etc/rc. d/rc 1l2: 2: wait:/etc/rc. d/rc 2l3: 3: wait:/etc/rc. d/rc 3l4: 4: wait:/etc/rc. d/rc 4l5: 5: wait:/etc/rc. d/rc 5l6: 6: wait:/etc/rc. d/rc 6ud: once:/sbin/updateca: ctrlaltdel:/sbin/shutdown-t3-r nowpf: powerfail: /sbin/shutdown-f-h + 2 "Power Failure; System Shutting Down" pr: 12345: powerokwait:/sbin/shutdown-c "Power Restored; Shutdown Cancelled" 1: 2345: Pushed:/sbin/mingetty tty12: 2345: respawn:/sbin/mingetty tty23: 2345: Pushed:/sbin/mingetty tty34: 2345: respawn:/sbin/mingetty tty45: 2345: respawn:/sbin/mingetty tty56: 2345: respawn:/sbin/mingetty tty6x: 5: respawn:/etc/X11/preofdm-nodaemon
The meaning of each line in/etc/inittab Format: code: runlevels: action: processcode: this is the identifier of each "project" (line). its Format can be one or two characters, some special actions must be matched with the special identifier. we recommend that you do not change the predefined identifier. Runlevels: this is the Run Level specified by this "project" (line). its format can be 0 ~ 6. any combination of characters. as long as the system's current Run Level meets the Level specified by this project, the content in this line will automatically take effect and the Command specified in this line will also be executed. For example, when the system is started to Run Level 5, the project "x: 5: respawn:/etc/X11/preofdm-nodaemon" will be executed, when the system is powered on to Run Level 2, 3, 4, and 5, the project "1: 2345: respawn:/sbin/mingetty tty1" takes effect. Action: This field tells "init" how to deal with this project. There are 15 different options available: initdefault, wait, respawn, and so on, for more information about the meaning they represent, see man initttab. Process: The Command and parameters to be executed.
Id: 3: initdefault: action "initdefault" tells init to open the system to Run Level 3
Si: sysinit:/etc/rc. d/rc. the sysinitrunlevel field is blank and tells init to execute this project (rc. sysinit) action "sysinit" tells init to prioritize the execution of this project. "Sysinit" ignores the runlevel field.
Ca: ctrlaltdel:/sbin/shutdown-t3-r nowaction "ctrlaltdel" tells init that when the system receives SIGINT (or the User simultaneously presses Alt + Ctrl + Del ), run this project (/sbin/shutdown-t3-r now ). If you do not want your system to restart after you press Alt + Ctrl + Del on the Console, you can modify this project.
5: 2345: respawn:/sbin/mingetty tty5 indicates to execute "/sbin/mingetty tty5" when entering RunLevel 2/3/4/5/6 ", action "respawn" indicates that after a session ends (the User is called the logout Console tty5), it is executed once "/sbin/mingetty tty5". if repawn is not used here, when the User Logout tty5, this Virtual Terminal will never go, that is, "Alt + F5" will no longer function.
  
  
  
  
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.