linux has its own complete boot system, grabbing the context of Linux boot, Linux boot process will no longer be mysterious.
This article assumes that the init tree set in inittab is:
/etc/rc.d/rc0.d/etc/rc.d/rc1.d/etc/rc.d/Rc2.d/etc/rc.d/rc3.d/etc/rc.d/rc4.d/etc/rc.d/rc5.d/etc/rc.d/rc6.d/etc/rc.d/Init.d
Directory
1. About linux startup 2. About rc.d3. Startup script example 4. About rc.local5. About bash startup script 6. About boot program auto Start
1. About Linux startup
init is the top init of all processes read /etc/inittab, execute rc.sysinit script (note that the file name is not necessarily, some Unix even The statement will be written directly in inittab.)
The rc.sysinit script does a lot of work:
init $PATH
config network
start swap function
set hostname
check root file system, repair if needed
check root space
....
rc.sysinit According to inittab, rc?.d script is a multi-user system. Getty is a watershed of multiple users and single users. The system script is run before getty
2. About rc.d
All The startup script is placed in /etc/rc.d/init.d under
rc?.d is init.d The link to the script, the naming format is:
S{number}{name}
K{number}{name}
S start the file to pass the start parameter to the script< Br>
K starts the file to pass the stop parameter to the script
number determines the order of execution
3. Startup script example
This is used to start httpd /etc/rc.d/init.d/apache Script:
Code:
#!/bin/bash
......
can be seen that he accepts start, stop, restart, status parameters
and then can create a link to rc?.d:
Code:
cd /etc/Rc.d/init.d &&
ln -sf ../init.d/apache ../rc0.d/K28apache &&
ln -sf . ./init.d/apache ../rc1.d/K28apache &&
ln -sf ../init.d/apache ../rc2.d/K28apache &&
ln -sf ../init.d/apache ../rc3.d/S32apache &&
ln -sf ../init.d/apache ../rc4.d /S32apache &&
ln -sf ../init.d/apache ../rc5.d/S32apache &&
ln -sf ../init.d /apache ../rc6.d/K28apache
4. About rc.local
The regular use of rc.local is completely customary. Title, not a standard.
These distributions have different implementation methods, which can be implemented as follows:
Code:
touch /etc/rc.d/rc.local
Chmod +x /etc/rc.d/rc.local
ln -sf /etc/rc.d/rc.local /etc/rc.d/rc1.d/S999rc.local &&
ln -sf /etc/rc.d/rc.local /etc/rc.d/rc2.d/S999rc.local &&
ln -sf /etc/rc .d/rc.local /etc/rc.d/rc3.d/S999rc.local &&
ln -sf /etc/rc.d/rc.local /etc/rc.d/Rc4.d/S999rc.local &&
ln -sf /etc/rc.d/rc.local /etc/rc.d/rc5.d/S999rc.local &&
ln -sf /etc/rc.d/rc.local /etc/rc.d/rc6.d/S999rc.local
5. About bash startup scripts
/Etc/profile
/etc/bashrc
~/.bash_profile
~/.bashrc
is the startup script for bash
Generally used to set up a single-user boot environment, you can also implement the program of the boot single user, but make sure that they belong to the bash category rather than the system category.
Although Linux systems are more secure than Windows, some simple security configurations are necess
win7 There are a lot of tricks, if used well, can make the win7 system get no small optimization. No
According to statcounter statistics, the global operating system market share in March is still Win7
1. Install Oracle VM virtualBox, I am using version 4.0. The official download address is here. 2.
Modify Linux MAC address in VMware virtual machine
Solve the disk space is full, making it impossible to read and write to the disk!
Linux Network Programming - socket option
Git some small experience and tips overview
Linux file search technology Daquan
Modify IP, DNS, and routing configuration under Linux
Yum install Tomcat basic tutorial
How to remove the alarm sound of Linux
Overview of the location of the Linux kernel in the entire operating system
Linux Regular Expressions - Wildcards
How to recover formatted files with EasyRecovery
Win10 how to set the bottom of the folder does not display the status bar
WinXP uninstall IE browser tips
Simple setup speeds up Windows 2003 shutdown speed
Ubuntu suddenly does not go to the network how to do
Windows 8 app store Microsoft commission ratio as low as 20%
Win8 system camera can not open the solution
Confirm: Win10 Edge browser abandons ActiveX and Silverlight plugins