Linux root directory parsing

Source: Internet
Author: User

The root directory structure is as follows:

                

1./-Root directory:

Each of the files and directories starts here.

Only the root user has write permissions to the directory. This directory differs from the/root directory in that the/root directory is the root user's home directory.

2./bin-User binary files:

Contains a binary executable file.

The commands used by all users of the system are located here, for example: PS,LS,PING,GREP,CP.

3./sbin-System binaries:

Just like/bin,/sbin also contains binary executables.

However, Linux commands in this directory are usually used by system administrators to maintain the system. For example: Iptables, reboot, Fdisk, ifconfig, swapon commands.

4./etc-Configuration file:

Contains the configuration files that are required for all programs.

It also contains startup and shutdown shell scripts for starting/stopping a single program. For example:/etc/resolv.conf,/etc/logrotate.conf

5./dev-Device files:

Contains device files.

These include terminal equipment, USB or any device connected to the system. For example:/dev/tty1,/dev/usbmon0

6./proc-Process Information

Contains information about the system process.

This is a virtual file system that contains information about the processes that are running. For example: The/proc/{pid} directory contains information related to a specific PID.

This is a virtual file system in which system resources exist as textual information. Example:/proc/uptime

7./var-variable file

var represents a variable file.

This directory allows you to find files that may grow in content.

This includes-system log files (/var/log), Package and database files (/var/lib), e-mail (/var/mail), print queue (/var/spool), lock Files (/var/lock), multiple restarts of required temporary files (/var/tmp) ;

8./tmp-Temp file

Contains system and user-created temporary files.

When the system restarts, the files in this directory will be deleted.

9./usr-user program

Source code that contains binaries, library files, documents, and level two programs.

The/usr/bin contains a binary file of the user program. If you can't find the user binaries in/bin, go to the/usr/bin directory to see. For example: At, awk, CC, less, SCP.

The/usr/sbin contains the system administrator's binaries. If you can't find the system binaries in/sbin, go to the/usr/sbin directory to see it. For example: ATD, Cron, sshd, Useradd, Userdel.

The/usr/lib contains the libraries used by/usr/bin and/usr/sbin.

The user program installed from the source is included in the/usr/local. For example, when you install Apache from the source, it will be in/usr/local/apache2.

/home-home Directory

All users use the home directory to store their personal files.

For example:/home/john,/home/nikita

One./boot-boot loader files

Contains the boot loader-related files.

The kernel's initrd, vmlinux, and grub files are located under/boot.

For example: Initrd.img-2.6.32-24-generic, Vmlinuz-2.6.32-24-generic

/lib-System Library

Contains library files that support binary files located under/bin and/sbin.

The library file is named ld* or lib*.so.*

Example: ld-2.11.1.so,libncurses.so.5.7

/OPT-Optional add-on application

opt represents opitional;

Contains additional applications from individual vendors.

Additional applications should be installed in subdirectories of/opt/or/opt/.

/MNT-Mount Directory

A temporary installation directory where the system administrator can mount the file system.

/media-Removable media devices

A temporary directory that is used to mount removable devices.

For example, mount the CD-ROM/media/cdrom, mount the floppy disk drive/media/floppy;

/SRV-Service data

The SRV Representative service.

Contains data related to server-specific services.

For example,/srv/cvs contains CVS-related data.

Linux root directory parsing

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.