Linux System directory Structure

Source: Internet
Author: User

The interface will normally appear when we enter the password for the first time. Of course, I have an extra a, this time for some of our Linux rookie do not know what to do, now let me try to learn a command LS, when I say this life is listed or show the meaning, some of the basic English will say: "Oh oh, it is a list"

The system directory before we talk about the ls this command, LS function is to list the specified directory or file, of course, most of the directory is, we first look at the system is given the LS interpretation of what the meaning we write the man LS on the command line

We try to look at this explanatory text, the Description section clearly tells us the function of the LS command, we will often use the man this command to see the interpretation and parameters of a command. Anyway, I have listed LS the most commonly used several parameters we contrast,

Explanation: 1, do not add any parameters and not with the directory name or file name

Lists the files and directories in the current directory, with hidden files in a single section.

2, plus "-a" option does not add the directory or file name

All files and directories in the current directory, including hidden files, are listed.

3. Add "-l" option without directory name and file name

All files and directories in the current directory are listed with their details.

4, the following only add the name of the item does not add the option

Will list the file name, in fact, it doesn't mean anything.

5, no option to add only the directory name after

The price and directory names under that directory are listed, but no hidden files are included.

To continue our Linux catalog, we can view the structure under our root directory with LS/.

  • /bin is the abbreviation for binary, which holds the most frequently used commands.

  • /boot Here are some of the core files used when starting Linux, including some linked files and image files.

  • /dev is an abbreviation for device. This directory is where Linux external devices are stored, and access to the device in Linux is different from the way it is accessed.

  • /etc This directory is used to store all the configuration files and subdirectories required for system administration.

  • /home User master directory, in Linux, each user has their own directory. In general, the directory is named after the account.

  • /lib This directory contains the system's most basic dynamic link sharing library, which acts like a DLL file in Windows. These shared libraries are required for almost all applications.

  • /lost+found This directory is generally empty, and when the system shuts down illegally, some files are stored here.

  • /media Linux system will automatically identify some devices, such as the U-disk drive and so on, when identified will be mounted in this directory.

  • The/MNT system provides this directory for user history to mount other file systems, we can mount the optical drive on the/mnt, and then enter the directory to view the contents of the CD-ROM.

  • /opt This is the directory where additional installation software for the host is placed. For example, if you install an Oracle database, you can put it under this directory. The default is empty.

  • /proc This directory is a virtual directory, it is the mapping of system memory, we can directly access the directory to obtain system information, the contents of this directory is not on the hard disk but in memory, we can also directly modify some of the files inside, such as can be used to block the host ping command, It is not possible for others to ping your machine. Echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all

  • /root The directory is a user home directory for system administrators, also known as super-privileged users.

  • /sbin S is the meaning of super user, which is a system manager used by the system administrator.

  • /selinux This directory is a directory owned by Redhat and CentOS, and SELinux is a security mechanism similar to the Windows Firewall, but this is a complex mechanism that stores selinux-related files.

  • /srv This directory holds data that needs to be extracted after some services are started.

  • /sys This is a big change in the Linux2.6 kernel. A new file system in the 2.6 kernel is installed in this directory Sysfs,sysfs file system integrates the information of the following three file system devices: The proc file system for process information, the Devfs file system for the device, and the Devpts file system for the pseudo-terminal. The file system is a visual reflection of the kernel device tree. When a kernel object is created, the corresponding files and directories are also created in the kernel object subsystem.

  • /tmp This directory is used to store some temporary files.

  • /usr This is a very important directory, the user many applications and files are placed in this directory, similar to the Program Files directory under Windows.

  • /usr/bin the application that the system user uses.

  • /usr/sbin super users use more advanced hypervisor and System daemons.

  • /USR/SRC The default placement directory for the kernel source code.

  • /var This directory is stocked with things that are constantly expanding, and we are accustomed to placing directories that are frequently modified in this directory, including various log files.

    In the Linux system, there are several directories are more important, usually need to be careful not to accidentally delete or arbitrarily change the internal files. /etc: Work also mentions this is the configuration file in the system, if you change a file under the wood may cause the system will not start. /bin,/sbin,/usr/bin,/usr/sbin: This is the system preset execution file placement directory, such as LS is in the/bin/directory. It is worth noting that/bin,/usr/bin is an instruction for the user of the system (except for the root field general account), while/sbin,/usr/sbin is the command to use for root. /var: this is a very important directory, the system ran a lot of programs, then each program will have a corresponding log generated, and these logs will be recorded in this directory, specifically in the/var/log directory, the other mail preset placement is also here.

Linux System directory Structure

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.