In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you what the role of multiple file directories in Linux is, the content is concise and easy to understand, it can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
With the continuous development of Linux, more and more people begin to use Linux, for those who have just come into contact with, perhaps the first to feel confused is those "unclear" directories. If you want to be proficient in using Linux and make Linux obey yourself, you must master these catalogs. Let's take XteamLinux 4.0, the latest product of Xteam, as an example to introduce the catalogs under this system.
/ bin bin is the abbreviation of Binary. This directory contains the most frequently used commands.
/ boot here are some core files used to start Linux, including some linked files and image files.
/ dev dev is an abbreviation for Device (device). In this directory are the external devices of Linux, and the way to access devices in Linux is the same as to access files.
The / etc directory is used to store all the configuration files and subdirectories needed for system administration.
/ home user's home directory. In Linux, each user has his or her own directory, which is usually named after the user's account.
/ lib this directory stores the system's most basic dynamic link sharing library, which is similar to the DLL file in Windows. Almost all applications need to use these shared libraries.
The / lost+found directory is usually empty, and some files are stored here when the system shuts down illegally.
/ mnt there are four directories in this directory. The system provides these directories to allow users to mount other file systems temporarily. We can mount the CD-ROM drive on / mnt/cdrom, and then enter the directory to view the contents of the CD-ROM drive.
/ proc this directory is a virtual directory, it is the mapping of system memory, we can access this directory directly to get system information. The contents of this directory are not on the hard disk but in memory. We can also modify some files directly. For example, you can use the following command to block the ping command of the host, so that others cannot ping your machine:
Echo 1 >; / proc/sys/net/ipv4/icmp_echo_
Ignore_all .
/ root this directory is the system administrator, also known as the super-privileged user home directory.
/ sbin s means Super User, and here is the system management program used by the system administrator.
/ tmp this directory is used to store some temporary files.
Many of the applications and files we will use are stored in the usr directory. Specifically:
/ usr/X11R6 directory where X-Windows is stored
/ usr/games stores Mini Game that comes with XteamLinux
/ usr/bin stores many applications
/ usr/sbin stores the hypervisor used by the root superuser
/ usr/doc Linux technical documentation
/ usr/include is used to store the header files needed to develop and compile applications under Linux.
/ usr/lib stores some commonly used dynamic link shared libraries and static archives
/ usr/local this is the / usr directory provided to ordinary users, where general applications are installed
Directory where the / usr/man help documentation is located
/ usr/src Linux open source code, there is this directory, fans don't let go.
The / var directory contains things that are constantly expanding, and we are used to putting directories that are often modified in this directory. Including various log files. If you want to make a website, you will also use the / var/www directory.
This article briefly explains the general contents of directories. If you want to become a master of Linux, you need to further study these directories under Linux.
Linux directory structure and windows have a very different design, which is easy for beginners to understand, here is a personal summary of some knowledge points to explain the Linux directory structure, including file types and some important file subdirectories.
At the top of the linux file system is /, a root called linux, where all directories, files, and devices are under /.
File type
Linux has four basic file system types: normal files, directory files, contiguous files, and special files. It can be identified with the file command.
Ordinary files: such as text files, c language source code, shell scripts, etc., you can use cat, less, more, vi, etc., to view the content, using mv to rename.
Directory files: including file names, subdirectory names and their pointers. You can use ls to list directory files
Linked file: those directory entries that point to an index node. When viewed with ls, the flag of the linked file begins with l, and the file points to the linked file with "- >".
Special files: such as disks, terminals, printers, etc., are represented in the file system and are often placed in the / etc directory. For example, floppy drive An is called / dev/fd0,/dev/had from the first hard drive.
/ bin: store the commands needed by the system, such as ls, cp, mkdir, etc.; the function is similar to / usr/bin, and the files in this directory are executable commands that can be used by ordinary users.
/ boot: this is the directory of files needed by Linux's kernel and boot system programs. Files such as initrd.img are in this directory, and the grub system boot manager is also located in this directory.
/ dev: device file storage directory, such as sound card, disk.
/ etc: the location of the system configuration file, and some server configuration files are also here, such as user account and password configuration files.
/ home: ordinary user directories store directories by default.
/ lib: the directory where the library files are stored
/ lost+found: when the system crashes unexpectedly or the machine shuts down unexpectedly, some file fragments are produced and put here. When the system starts up, the fsck bus will check here and repair the corrupted file system.
/ mnt: this directory is used to hold the mount directory where the storage device is mounted. For example, there are cdrom and other directories. / etc/fatab
/ opt: it means optional, and some packages will also be installed here, that is, custom packages.
/ proc: process information and kernel information are stored here when the operating system is running. Proc is not a real file system, and its definition can be found in / etc/fstab
The directory of the / root:linux super privilege user root.
/ sbin: most of them are the storage of commands related to system management, and are directable command storage places for super-privilege user root. Ordinary users do not have permission to execute commands under this directory, which is similar to the / usr/sbin;/usr/local/sbin directory. Everything contained in the directory sbin can only be executed with root permissions.
/ tmp: temporary file directory, sometimes when the user runs the program, temporary files are generated. This directory is similar to the / var/tmp directory.
/ usr: this is the directory where the system stores programs, such as commands, help files, etc. When we install a package officially provided by a linux distribution, it is mostly installed here. If any server configuration files are involved, the configuration files will be installed in the / etc directory. The / usr directory includes the design font directory / usr/share/fonts, the help directory / usr/share/man or / usr/share/doc, the general user executable file directory / usr/bin or / usr/local/bin; super privilege user root executable command storage directory, such as / usr/sbin or / usr/local/sbin, and the program header file storage directory / usr/include
/ var: the contents of this directory are constantly changing. There is / var/log under / var. This is the directory where system logs are stored. / var/lib is used to store some library files, such as MySQL.
/ media: this directory is empty and is used for mounting.
/ selinux: I don't know exactly how to use it!
/ srv: files that need to be accessed by some services are stored here
/ sys: the core file of the system
/ cdrom: optical drive
Some important subdirectories:
/ etc/init.d: this directory is used to store scripts started by the system or server in System V mode.
/ etc/X11: this is where the X-Window-related configuration files are stored.
/ usr/bin: this directory is the directory of executable programs, and the average user has permission to execute it; when we install a program from a package that comes with the system, most of its executable files are placed in this directory.
/ usr/sbin: this directory is also the directory of executable programs, but most of them store commands managed by the design system and can only be executed with root permissions.
/ usr/local: this directory is generally used to store the directory where the user compiles and installs the software; the software installed through the source package is usually installed in this directory if no specific installation directory is specified.
/ usr/share: the storage place of things shared by the system.
/ usr/src: the directory where the kernel source code is stored.
The above is what is the function of multiple file directories in Linux. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.