Overview of Linux

Linux

pwd -- view the current directory

whoami - see who I am

shutdown—shutdown

reboot—reboot

ls--list all directories and files in the current directory (-r is displayed according to the tree stump structure)

All hardware and files in linux are directories or files

How the hardware is named: /dev/xxyN

Hard disk naming:

 The first two letters xx represent the device type where the partition is located, hd represents IDE hard disk, SD represents SCSI hard disk

 y represents the device where the partition is located, /hda (the IDE hard disk is checked for the first interface), /sdb (the scsi hard disk is checked for the second interface), and /&&etc.. are arranged in order

 N is a number, representing the partition. The first four partitions (primary or extended) are arranged with numbers 1-4. Logical partitions start at 5. /dev/hda3 represents the third primary or extended partition on the first IDE hard disk; /dev/hda5 represents the first logical partition on the first IDE hard disk; /dev/sdb7 is the second scsi hard disk The 3rd logical partition on;

mount point:

You need to create a directory to associate the hardware with it and you can use it

rmdir directory name - delete non-empty directory

mkdir creates a directory cdrom

mount /dev/cdrom /mnt/cdrom - implements the mount

cd cdrom -- to access the optical drive

unmount /dev/cdrom — unmount

MBR contains the partition table of the hard disk and the master boot program

Located in the first physical sector (absolute sector) of the hard disk cylinder 0, head 0, sector 1 position.

Partitions mainly include primary/extended partitions and logical partitions.

 

The naming and meaning of the linux directory (essentially the mount point):

Partitioning scheme: at least two partitions root partition (/) and swap partition (SWAP)

swap uses the hard disk as virtual memory (at least twice the actual memory).

Personal desktop partition: root partition (/), file and program partition (/boot) required for linux boot process, user partition (/usr), swap partition (SWAP)

For CD burning, add a /tmp partition

The entry of the /Linux file system is also the directory at the highest level;

/bin The commands required by the basic system are located in this directory, and they are also the commands required by the minimum system: such as ls cp mkdir and other commands; the function is similar to /usr/bin, the files in this directory are executable, as the basic operating system where the command is placed.

/boot The Linux kernel and files needed to boot the file system, such as the initrd.img file, are located in this directory. In general, the GRUB or LILO system boot manager is located in this directory;

/dev device file storage directory, such as sound card hard disk, etc.

The location of /etc system configuration files, such as user account passwords and configuration files (server configuration files)

/home ordinary user directory default storage directory

/lib library file storage directory

/tmp temporary file directory, sometimes temporary files will be generated when the user runs the program, this directory is used to store temporary files.

/sbin stores the commands related to system management. It is the place where the root user can execute commands. Ordinary users have no right to execute these commands. All commands in this directory need administrator rights to run.

 

 

Linux boot sequence (linux layered boot 0~6 layers)

Start the BIOS->MBR to read the operating system configuration->load the system partition to find the core file of the system partition->load the operating system initialization process->execute sysinit->load other under rc.d (rc stands for server background process) in the etc directory Modules (etc/modules.conf) -> execute layered startup script

 (The layers represent layers 0-6, respectively

0 - System shutdown state

1- Single user working status

2- Multi-user working state (no NFS network file system)

3-Multi-user working state (also NFS network file system)

4- The system is not used, the system is reserved

5- Graphical interface

6- The system shuts down gracefully and restarts

 

 )->run rc.local under rd.d->execute /bin/login login interface->shell started…

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327042147&siteId=291194637