Talk about important subdirectory issues in Linux system

Talk about important subdirectory issues in Linux system

/etc/fstab

Automatically mount partitions/disks, specify which partition/device to mount to

 [root@oldboy ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun Aug 12 17:26:53 2018
#
# 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=c9b74b1a-41cd-4260-9444-6245ab833dd9 / ext4 defaults 1 1
UUID=8880df83-5bf8-40db-bf6f-bf878b7a7e2e /boot ext4 defaults 1 2
UUID=3144b92b-c079-4239-9a91-84111d2f1ac1 swap swap defaults 0 0
tmpfs //To mount the device /dev/shm //Mount point tmpfs //File system type defaults //Mount on option 0 //Whether to back up 0 //Whether to do a power-on self-check devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

/etc/resolv.conf

DNS Temporary Configuration File

[root@oldboy ~]# cat /etc/resolv.conf 
; generated by /sbin/dhclient-script
search localdomain
nameserver 192.168.182.2
[root@oldboy ~]# vi /etc/resolv.conf 
; generated by /sbin/dhclient-script
search localdomain
nameserver 192.168.182.2
nameserver 8.8.8.8
~                                        
~                                                                              
~                                        
~                                        
"/etc/resolv.conf" 4L, 100C written
[root@oldboy ~]# cat /etc/resolv.conf 
; generated by /sbin/dhclient-script
search localdomain
nameserver 192.168.182.2
nameserver 8.8.8.8

/etc/hosts

Hostname resolution file:

The hosts file stores the correspondence between IP addresses and domain names

effect:

• Used by developers, product developers, testers, etc. to test products through official domain names
• Server calls can be made using domain names (internal DNS) for easy migration

[root@oldboy ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

/etc/sysconfig/nework

[root@study ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=study //Host name

Modify the host name

•vim /etc/sysconfig/network
•sed -i 's#HOSTNAME=study#HOSTNAME=centos#g' /etc/sysconfig/network

/etc/rc.local

Files where the startup program commands are stored (chkconfig is often used to manage the automatic startup of program services installed by yum/rmp)

/etc/inittab

Runlevel configuration files

/etc/issue

Login prompt configuration file

[root@study ~]# cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m

/var/log/messages

System information log file

PS: Let's look at the Linux subdirectory below

lost+found stores repaired or damaged files
misc miscellaneous equipment
net command line commands
proc An image of all running processes
tmp Temporary files that disappear after each reboot
var extracts the files that need to be changed during the operation of the usr directory or the temporarily generated files and directories, so that the usr directory can be mounted as read-only.
boot
The kernel and the files needed to load the kernel
media
Mainly interact with SessionManager to perform multimedia playback, pause and other operations
mnt
The directory of the mounted CD-ROM drive and USB device will have a corresponding device directory in mnt after loading.
opt : optional application installation package
Implementation of selinux mandatory access directory
sys system replication

Summarize

The above are the important subdirectories of the Linux system introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Two ways to install the Linux subsystem in Windows 10 (with pictures and text)
  • Detailed explanation of the time representation example of the Linux time subsystem
  • Teach you how to enable the Linux subsystem of Win10 (with detailed pictures and text)
  • Win10 installation Linux subsystem graphic tutorial
  • Simply master the usage of fork() function to create child processes in Linux system
  • Analysis of the Linux input subsystem framework principle

<<:  Implementing the page turning effect through sliding and the click event problem on the mobile terminal

>>:  Detailed steps for installing and configuring MySQL 5.7

Recommend

In-depth analysis of MySQL index data structure

Table of contents Overview Index data structure B...

Vue-CLI multi-page directory packaging steps record

Page directory structure Note that you need to mo...

Share JS four fun hacker background effect codes

Table of contents Example 1 Example 2 Example 3 E...

Introduction to several ways to introduce CSS in HTML

Table of contents 1. Embed CSS styles directly in...

How to test the maximum number of TCP connections in Linux

Preface There is a misunderstanding about the max...

How to create a MySQL master-slave database using Docker on MacOS

1. Pull the MySQL image Get the latest MySQL imag...

Implementation of vue-nuxt login authentication

Table of contents introduce Link start Continue t...

Project practice of deploying Docker containers using Portainer

Table of contents 1. Background 2. Operation step...

Linux sudo vulnerability could lead to unauthorized privileged access

Exploiting a newly discovered sudo vulnerability ...

Detailed graphic tutorial on installing centos7 virtual machine in Virtualbox

1. Download centos7 Download address: https://mir...

Functions in TypeScript

Table of contents 1. Function definition 1.1 Func...

How to solve the Mysql transaction operation failure

How to solve the Mysql transaction operation fail...

vue-amap installation and usage steps

I have previously shared the usage of asynchronou...

Front-end state management (Part 2)

Table of contents 1. Redux 1.1. Store (librarian)...

Design of pop-up windows and floating layers in web design

In the trend of gradual transition from tradition...