Linux Learning notes-Directory Knowledge

Source: Internet
Author: User
Tags system log temporary file storage

Linux directory Knowledge

650) this.width=650; "Src=" HTTPS://SS1.BDSTATIC.COM/70CFUXSH_Q1YNXGKPOWK1HF6HHY/IT/U=3423881200,158360791&FM =15&gp=0.jpg "alt=" U=3423881200,158360791&fm=15&gp=0.jpg "/>

1th Section View Linux Directory

[[email protected]/]# tree-l 1 #<== View directory with the tree command.                  -l,layer, view the directory hierarchy: ├──bin├──boot├──data├──dev├──etc├──home

Section 2nd features of the Linux directory

    • / is the vertex of all directories.

    • The directory structure is like a tree hanging upside down.

    • Directories and disk partitions are not associated by default.

    • / under different directories may correspond to different disks or partitions.

    • If the device is not mounted, it is not visible to the entrance, like a prison without a window. If the device wants to be accessed, it needs to mount the disk first.

3rd section directory hierarchy standard FHS

Filesystem Hierarchy Standard (file system hierarchy standards) abbreviation, most Linux version adopts this kind of file organization form, similar to the file directory of C disk in Windows operating system, FHS uses the tree structure organization file. FHS defines the purpose of each region in the system, the minimum required composition of the files and directories, and also gives the exception handling and contradictory processing. http://www.pathname.com/fhs/pub/fhs-2.3.pdf.

Section 4th Introduction to each catalogue

1)/bin----Common binary commands in the same directory

2)/boot----kernel and the file directory required by the system boot program

3)/dev----directory where the device files are stored

4)/etc----Binary Software installation package configuration file default path; service Start command path/etc/init.d/

5) /home---- Home directory default data storage path for normal users

6) Storage directory for/lib----library files

7)/lost+found----Storing fragmented files

8)/mnt----Temporary Mount storage device

9)/opt----option, which indicates a selectable directory

/PROC----operating system, process information (CPU, hard disk partition, memory information, etc.) is stored here

/sbin----Most of the commands that are involved in system administration are stored in the executable command of the super-user root

/tmp----temporary file storage directory

/usr----The directory where the user program is stored

/var----the contents of this directory are constantly changing, the following general storage System log and so on. (/var/log/message;var/log/secure)

Section 5th Important Documents

5.1/etc/sysconfig/network-scripts/ifcfg-eth0
configuration file for Nic [[email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0 #<== Different device filenames may be different device=eth0hwaddr= 00:0c:29:ac:4a:35type=ethernetuuid=9dfed44f-e791-45a6-8492-6a668853d2bbonboot=yesnm_controlled=yesbootproto= staticipaddr=192.168.1.11prefix=24gateway=192.168.1.1dns1=101.226.4.6dns2=114.114.114.114
5.2/etc/resolv.conf

DNS configuration files that affect the Internet function. (The configuration of the network card takes precedence over this configuration)

[Email protected] ~]# cat/etc/resolv.conf; Generated By/sbin/dhclient-scriptsearch homenameserver 101.226.4.6nameserver 114.114.114.114
5.3/etc/hosts

Set the IP and domain name corresponding table, the equivalent of LAN DNS. (DNS configuration that takes precedence over the Internet)

[Email protected] ~]# cat/etc/hosts127.0.0.1 localhost localhost.localdomain localhost4localhost4.localdomain4::1 localhost Localhost.localdomainlocalhost6 localhost6.localdomain6
5.4/etc/sysconfig/network

Host name configuration file

[Email protected] ~]# CAT/ETC/SYSCONFIG/NETWORKNETWORKING=YESHOSTNAME=LT1
5.5/etc/fstab

Log on to mount a file on the file system

[[email protected] ~]# cat /etc/fstab ## /etc/fstab# created by  Anaconda on wed aug  2 07:12:45 2017## accessible filesystems,  by reference,are maintained under  '/dev/disk ' # see man pages  Fstab (5),  findfs (8), Mount (8)  and/or blkid (8)  for more info#uuid= E04ab670-2f2e-41de-906b-4067e2fa509e/    ext4   defaults   1  1UUID=c1fa18da-eacd-40b2-8046-7dbc584825c2/boot  ext4   defaults     1 2UUID=0a1c2136-c98c-4c5b-bf12-a4ba2a6744ccswap  swap     defaults   0 0tmpfs    /dev/shm   tmpfs    defaults      0 0devpts   /dev/pts    Devpts    gid=5,mode=620  0 0sysfs    /sys     sysfs    Defaults     0 0proc   /proc     proc    defaults     0 0
5.6/etc/rc.local

The file that is used to hold the Boot program command. (Chkconfig is commonly used to manage Yum and RPM-installed program services).

5.7/etc/inittab

Set the runlevel of the system startup and the corresponding files of loading related level.

5.8/etc/exports

Setting Configuration files for NFS network file systems

5.9/ETC/INIT.D

The default startup program directory used to store the system or software installed through the Yum or RPM tools.

5.10/etc/profile****

System Global environment variable permanently active configuration file

5.11/ETC/PROFILE.D

Load the System log directory program, command or file independent existence!

5.12/etc/issue

Pre-logon Tips

5.13/ETC/MOTD

Post-Login Tips

5.14/usr/local

Generally used to store the user self-compiled software directory.

5.15/var/log/message

System log files


Linux Learning notes-Directory Knowledge

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.