Simple analysis based on the structure description and use of each folder of Linux

The structure description and use of each folder under linux:

/bin: Binary executable command.

/dev: Device special file.

/etc: System management and configuration files.

/etc/rc.d: The startup configuration file and script.

/home: The base point of the user's home directory. For example, the user's home directory is /home/user, which can be represented by ~user.

/lib: The standard programming library, also known as the dynamic link shared library, acts like a .dll file in windows.

/sbin: System management command, where the management program used by the system administrator is stored.

/tmp: Public temporary file storage point.

/root: The home directory of the system administrator.

/mnt: This directory is provided by the system to allow users to temporarily mount other file systems.

/lost+found: This directory is usually empty, and the files that are not properly shut down and leave "homeless" are here.

/proc: The virtual directory is the mapping of system memory. You can access this directory directly to get system information.

/var: An overflow area for some large files, such as log files for various services.

/usr: The largest directory, the applications and files to be used are almost in this directory. Which contains:

/usr/x11r6: The directory where x window is stored.

/usr/bin: Numerous applications.

/usr/sbin: Some hypervisor management programs.

/usr/doc: linux documentation.

/usr/include: The header files needed to develop and compile the application under linux.

/usr/lib: Configuration files for commonly used dynamic link libraries and packages.

/usr/man: Help documentation.

/usr/src: Source code, the source code of the linux kernel is placed in /usr/src/linux.

/usr/local/bin: Locally added commands.

/usr/local/lib: Locally added library root file system.

In general, the root file system should generally take up less space, because most of the files do not need to be changed frequently, and the strict file and a small file system that changes infrequently are not easily damaged. The root directory generally does not contain any files except for a possible system boot image called the /vmlinuz standard. All other files are in a subdirectory of the root file system.

1. /bin directory

The /bin directory contains the commands needed to boot the boot or the commands that the normal user might use (possibly after the boot is started). These commands are binary executables (bin is short for binary), and most of them are important system files in the system.

2. /sbin directory

The /sbin directory is similar to /bin and is also used to store binary files. Because most of these files are the basic system programs used by system administrators, they are generally not used by ordinary users, although they are available and necessary for ordinary users.

3. /etc directory

The /etc directory stores various system configuration files, including the user information file /etc/passwd, the system initialization file /etc/rc, and so on. Linux relies on these files to run normally.

4. /root directory

The /root directory is the superuser's directory.

5. /lib directory

The /lib directory is a shared library required by programs on the root file system to store the shared files needed to run the root file system program. These files contain code that can be shared by many programs, so that each program contains a copy of the same subroutine, which can make the executable smaller and save space.

6. /lib/modules directory

The /lib/modules directory contains the system cores that can load various modules, especially those that are required to reboot the system when restoring a corrupted system (such as network and file system drivers).

7. /dev directory

The /dev directory stores device files, which are device drivers, through which users access external devices. For example, users can access mouse input by accessing /dev/mouse just like accessing other files.

8. /tmp directory

The /tmp directory stores information and data generated by the program at runtime. But after the boot is started, it is best to use /var/tmp instead of /tmp for the running program, because the former may have a larger disk space.

9. /boot directory

The /boot directory holds the files used by the bootstrap loader, such as lilo, and the core image is often placed here instead of in the root directory. But if there are many core images, this directory can become very large, and it would be better to use a separate file system. Another point to note is that you must ensure that the core image must be in the first 1024 cylinders of the ide hard drive.

10. /mnt directory

The /mnt directory is the mount point for system administrators to temporarily mount a file system. The program does not automatically support installation to /mnt. /mnt can be divided into many subdirectories. For example, /mnt/dosa may be a floppy drive using the msdos file system, and /mnt/exta may be a floppy drive using the ext2 file system, /mnt/cdrom, etc.

11. /proc, /usr, /var, /home directory

The mount point for other file systems.

The directory tree can be divided into small parts, each of which can be on its own disk or partition. The main parts are the root, /usr, /var, and /home file systems. Each part has a different purpose.

Each machine has a root file system that contains the files necessary for system booting and other file systems to be mounted. The root file system should have enough content for a single-user state. It should also include tools to repair damaged systems, restore backups, and more.

The /usr file system contains all the commands, libraries, man pages, and other files that are not required for normal operations.

/usr should not have files to be modified in general use. This allows files in this file system to be shared over the network, which is more efficient because it saves disk space (/usr is easily hundreds of megabytes) and is easy to manage (when upgrading the application, only the primary /usr needs to be changed, There is no need to change each machine. Even if this file system is on a local disk, it can be read-only mount to reduce file system corruption in the event of a system crash.

The /var filesystem contains files that change, such as the spool directory (mail, news, printers, etc.), log files, formatted manual pages, and staging files. Traditionally everything in /var has been somewhere under /usr, but such /usr is not possible to read-only.

The /home file system contains the user's home directory, which is all the actual data on the system. A large /home may be divided into several file systems, and you need to add a first-level name to /home, such as /home/students, /home/staff, and so on.

Simple analysis based on the structure description and use of each folder of Linux

The following details:

/etc file system

The /etc directory contains various system configuration files, some of which are described below. Others should know which program they belong to and read the man page of the program. Many network configuration files are also in /etc.

1. /etc/rc or /etc/rc.d or /etc/rc?.d: Starts, or changes the directory of scripts or scripts that run at runtime.

2. /etc/passwd: User database, where the domain gives the user name, real name, user start directory, encrypted password, and other information about the user.

3. /etc/fdprm: A floppy disk parameter table to illustrate different floppy disk formats. It can be set with setfdprm. See the help page for setfdprm for more information.

4. /etc/fstab: Specifies a list of file systems that need to be automatically installed at startup. It also includes information about the swap area enabled with swapon -a.

5. /etc/group: Similar to /etc/passwd, but it does not describe user information but group information. Includes various data for the group.

6. The configuration file for /etc/inittab:init.

7. /etc/issue: Includes the output of the user before the login prompt. Usually includes a short description or welcome message for the system. The specific content is determined by the system administrator.

8. /etc/magic: The configuration file for "file". Contains instructions for different file formats based on which "file" guesses the file type.

9. /etc/motd: motd is an abbreviation of message of the day, which is automatically output after the user successfully logs in. The content is determined by the system administrator.

Often used for notification information, such as warnings about scheduled shutdown times.

10. /etc/mtab: A list of currently installed file systems. Initialized by a script (scritp) and automatically updated by the mount command. Used when a list of currently installed file systems is required (for example, the df command).

11. /etc/shadow: The shadow password file on the system where the shadow password software is installed. The shadow password file moves the encrypted password in the /etc/passwd file to /etc/shadow, which is only readable by the superuser (root). This makes it more difficult to decipher passwords, thereby increasing the security of the system.

12. /etc/login.defs: The configuration file for the login command.

13. /etc/printcap: Similar to /etc/termcap but for printers. The syntax is different.

14. /etc/profile, /etc/csh.login, /etc/csh.cshrc: Files executed by bourne or cshells at login or startup. This allows the system administrator to establish a global default environment for all users.

15. /etc/securetty: Confirm the secure terminal, which terminal allows the superuser (root) to log in. Generally only virtual consoles are listed, which makes it impossible (at least very difficult) to break into the system via a modem or network and get superuser privileges.

16. /etc/shells: Lists the shells that can be used. The chsh command allows the user to change the login shell within the scope specified in this file. The service process ftpd that provides a machine ftp service checks whether the user shell is listed in the /etc/shells file. If not, the user will not be allowed to log in.

17. /etc/termcap: Terminal Performance Database. Explain what "escape sequence" control is used by different terminals. When writing a program, you don't directly output the escape sequence (so you can only work on a specific brand of terminal), but look up the correct sequence of work to do from /etc/termcap. In this way, most programs can run on most terminals.

/dev file system

The /dev directory includes device files for all devices. Device files are named with a specific convention, which is described in the device list. Device files are generated by the system during installation and can be described later using /dev/makedev. /dev/makedev.local is the descriptive document written by the system administrator for local device files (or connections) (ie, some non-standard device drivers are not part of the standard makedev). The following is a brief introduction to some common files under /dev.

1. /dev/console: The system console, which is the monitor that is directly connected to the system.

2. /dev/hd:ide hard drive interface. For example: /dev/hda refers to the first hard disk, and had1 refers to the first partition of /dev/hda. If there are other hard disks in the system, they are /dev /hdb, /dev/hdc, . . . . . . ;; if there are multiple partitions, they are hda1, hda2 . . . . . .

3. /dev/sd: scsi disk driver interface. If the system has a scsi hard drive, it will not access /dev/had and will access /dev/sda.

4. /dev/fd: floppy drive device driver. For example: /dev/fd0 refers to the first floppy disk of the system, which is commonly referred to as a disk, /dev/fd1 refers to the second floppy disk, . . . . . . . . . and /dev/fd1 h1440 means access to drive 1 4.5 high density disk.

5. /dev/st: scsi tape drive driver.

6. /dev/tty: Provides virtual console support. For example: /dev/tty1 refers to the system's first virtual console, and /dev/tty2 is the system's second virtual console.

7. /dev/pty: Provides remote login pseudo terminal support. The /dev/pty device is used for telnet login.

8. /dev/ttys: The serial interface of the computer, which is the "com1" port for dos.

9. /dev/cua: Computer serial interface, device used with the modem.

10. /dev/null: "black hole", all information written to the device will disappear. For example, when you want to hide the output information on the screen, just input the output information into /dev/null.

/usr file system

/usr is a very important directory, usually this file system is very large, because all programs are installed here. All files in /usr are usually from the Linux distribution; locally installed programs and other things are under /usr/local, as this eliminates the need to reinstall all programs when upgrading a new or new release. Much of the content in the /usr directory is optional, but these features make the user more efficient with the system. /usr accommodates many large packages and their configuration files. Some important directories are listed below (some less important directories are omitted).

1. /usr/x11r6: Contains all executables, configuration files, and support files for the x window system. To simplify the development and installation of x, x files are not integrated into the system. The x window system is a powerful graphical environment that provides a large number of graphical tool programs. If users are familiar with microsoft windows, they will not feel helpless about the x window system.

2. /usr/x386: Similar to /usr/x11r6, but specifically for x 11 release 5.

3. /usr/bin: Centralizes almost all user commands and is the system's software library. Other commands are in /bin or /usr/local/bin.

4. /usr/sbin: Includes unnecessary system management commands for the root file system, such as most service programs.

5. /usr/man, /usr/info, /usr/doc: These directories contain all man pages, gnu information files, and various other document files. The "section" of each online manual has two subdirectories. For example: /usr/man/man1 contains the source code for the first section of the online manual (the original file is not formatted), and /usr/man/cat1 contains the first section of the formatted content. The online manual is divided into the following nine sections: internal commands, system calls, library functions, devices, file formats, games, macro packages, system management, and core programs.

6. /usr/include: Contains c language header files, mostly ending in .h, used to describe the data structures, subroutines, and constants used in C language programs. In order to maintain consistency, this should actually be placed under /usr/lib, but it is customary to use this name.

7. /usr/lib: Contains constant data files for programs or subsystems, including some site-wide configuration files. The name lib is derived from the library; the original library of programming is also stored in /usr/lib. When the program is compiled, the program will connect to the library. There are also many programs that store configuration files.

8. /usr/local: Locally installed software and other files are placed here. This is very similar to /usr. Users may find some larger software packages such as tex, emacs, etc. here.

/var file system

/var contains the data to be changed when the system is running normally. Usually the size of the directory where the data is located is constantly changing or expanding. Some of the original /var directories are in /usr, but in order to keep the /usr directory relatively stable, put the directories that need to be changed frequently into /var. Each system is specific, that is, it is not shared with other computers over the network. Listed below are some important directories (some less important directories are omitted).

1. /var/catman: Includes a formatted help page. The source files for the help page are generally found in /usr/man/catman; some man pages may have a pre-formatted version, which exists in /usr/man/cat. Other man pages need to be formatted the first time they are viewed. The formatted version exists in /var/man, so that others don't have to wait for formatting when they look at the same page. (/var/catman is often cleared, just like clearing temporary directories.)

2. /var/lib: Stores the files to be changed when the system is running normally.

3. /var/local: Stores the variable data of the program installed in /usr/local (that is, the program installed by the system administrator). Note that if necessary, even locally installed programs will use other /var directories, such as /var/lock .

4. /var/lock: Lock the file. Many programs follow the convention of generating a lock file in /var/lock to support that they are using a particular device or file. Other programs notice that this lock file will no longer use this device or file.

5. /var/log: log files for various programs, especially login (/var/log/wtmplog records all logins and logouts to the system) and syslog (/var/log/messages records store all cores and System program information). Files in /var/log often grow indefinitely and should be cleaned up periodically.

6. /var/run: Saves the information file about the system that was valid before the next system boot. For example, /var/run/utmp contains information about the currently logged in user.

7. /var/spool: The directory where the "spool" program is placed, such as mail, news, print queues, and directories where other queues work. Each different spool has its own subdirectory under /var/spool. For example, the user's mailbox is stored in /var/spool/mail.

8. /var/tmp: Allows larger or longer temporary files than /tmp. Note that the system administrator may not allow /var/tmp to have very old files.

/proc file system

The /proc file system is a pseudo file system, which means that it is a directory that does not actually exist, so this is a very special directory. It does not exist on a disk, but is generated by the core in memory. This directory is used to provide information about the system. Here are some of the most important files and directories (the /proc filesystem is described in more detail in the proc man page).

1. /proc/x: Information directory about process x, where x is the identification number of this process. Each process has a directory under its /proc called its own process number.

2. /proc/cpuinfo: Stores information about the processor (cpu), such as the type, manufacturer, model, and performance of the cpu.

3. /proc/devices: A list of device drivers for the currently running core configuration.

4. /proc/dma: Displays the currently used dma channel.

5. /proc/filesystems: File system information for the core configuration.

6. /proc/interrupts: Displays the interrupt information and occupant information occupied, as well as the number of occupied.

7. /proc/ioports: The currently used i/o port.

8. /proc/kcore: System physical memory image. It's exactly the same size as physical memory, but it doesn't actually take up so much memory; it's only created when the program accesses it. (Note: Nothing takes up any disk space under /proc unless you copy it to somewhere.)

9. /proc/kmsg: The message output by the core. Will also be sent to the syslog.

10. /proc/ksyms: The core symbol table.

11. /proc/loadavg: System "average load"; 3 meaningless indicators indicate the current workload of the system.

12. /proc/meminfo: Various memory usage information, including physical memory and swap partitions (swap).

13. /proc/modules: Stores which core module information is currently loaded.

14. /proc/net: Network protocol status information.

15. /proc/self: A symbolic link to the process directory of the program that views /proc. When 2 processes view /proc, this will be a different connection. This is mainly for the program to get its own process directory.

16. /proc/stat: The different states of the system, for example, the number of times the page has encountered an error after the system was started.

17. /proc/uptime: The length of time the system was started.

18. /proc/version: The core version.

/usr/local is generally the directory where you install the software. This directory is equivalent to the programefiles directory under windows.

/opt This directory is the installation directory of some large software, or the installation directory of some service programs.

For example: the test version of Firefox just installed can be installed in the /opt/firefox_beta directory. The /opt/firefox_beta directory contains all the files, libraries, data, etc. needed to run Firefox. To remove firefox, you only need to delete the /opt/firefox_beta directory, which is very simple.

/usr/local

This is mainly for software that is manually installed, that is, software that is not installed through "Synaptic" or apt-get. It has a similar directory structure to the /usr directory. Let the package manager manage the /usr directory and put the custom scripts under the /usr/local directory. I think this should be a good idea.

Laptop Stands And Risers

Laptop Stands And Risers,Laptop Riser Computer Laptop Stand,Laptop Folding Table Stand Aluminum,Laptop Stand Portable Aluminum Laptop Riser

Shenzhen ChengRong Technology Co.,Ltd. , https://www.laptopstandsupplier.com