Article From:

I. Linux System Startup Process

1)Core boot.

When the computer turns on the power supply, first of all, BIOS boot self-check, according to the BIOS set up in the boot device (usually hard disk) to start.

After the operating system takes over the hardware, it first reads the kernel files in the / boot directory.

2)Run init.

init Process is the starting point of all processes in the system. You can compare it to the ancestor of all processes in the system. Without this process, no process in the system will start.

init The program first needs to read the configuration file / etc / inittab.

 Many programs need to start. They are called “service” in Windows and “daemon” in Linux.

3)System initialization.

In the init configuration file, there is a line: si:: sysinit:/etc/rc.d/rc.sysinit, which invokes / etc/rc.d/rc.sysinit, which executes / etc/rc.d/rc.sysinit, while rc.sysinit is a bash she.Ll’s script, which mainly completes some system initialization work, rc. sysinit is an important script that must be run first at each level of operation.

Its main tasks are: activating switching partitions, checking disks, loading hardware modules and other tasks that need to be prioritized.

4)Set up terminal.

rcAfter execution, return to init. By this time, the basic system environment has been set up, and various daemons have been started.

initNext, six terminals will be opened to allow users to log in to the system. The following six lines in inittab define six terminals

5)User login system.

Generally speaking, there are three ways for users to log in:

(1)Command line login

(2)sshSign in

(3)GUI landing

By default, we log in to the first window, which is tty1. The six windows are tty1, tty2, and so on. Tty6, you can switch them by pressing Ctrl + Alt + F1 ~ F6.

2. Basic attributes of Linux files: ls-l

dr-xr-xr-x   2 root root 4096 Dec 14  2012 bin
dr-xr-xr-x   4 root root 4096 Apr 19  2012 boot

In the example, the first attribute of the bin file is represented by “d”. “D” represents a directory file in Linux.

The first character in Linux represents the file as a directory, file, link file, etc.

  • Do sth.d ]It is a directory.
  • Do sth.– ]Documents;
  • If [l ]It is expressed as a link file.
  • If [b ]It is represented as a storage interface device (random access device) in the device file.
  • If [c ]Represents a serial port device in a device file, such as a keyboard or mouse (a disposable reader).

For a file, it has a specific owner, that is, the user who owns the file.

At the same time, in Linux system, users are classified by groups, and a user belongs to one or more groups.

Users other than file owners can be divided into group users and other users of file owners.

Therefore, the Linux system stipulates different file access rights according to the file owner, the same group of users of the file owner and other users.

Leave a Reply

Your email address will not be published. Required fields are marked *