Linux Study three -Linux Some important configuration files of the system

1、 Network card profile

/etc/sysconfig/network-scripts/ifcfg-eth0

explain :

DEVICE=eth0        # The network card name

HWADDR=××:××:××:××:××:×× # NIC mac Address , common 48 Use here 12 A hexadecimal number means

TYPE=Ethernet    # The network type is Ethernet

UUID=bc0ccb72-8f79-4c6f-a958-ffe55f6595e3 # A unique user ID , Equivalent to ID number

ONBOOT=yes    # Control whether the network card is powered on

NM_CONTROLLED=yes    # Whether to pass networkmanager Manage network card devices

BOOTPROTO=dhcp    # Boot access to network protocol , Yes none,static,dhcp,bootp

2、 Host name profile

/etc/sysconfig/network

3、DNS Service profile

/etc/resolv.conf Is used to specify the dns Domain name resolution server

4、hosts analysis

/etc/hosts Used for configuration host analysis

hosts File is Windows One of the systems is responsible for IP Address and domain name fast resolution of the file , With ASCLL Format preservation . The computer is typing in the domain name ( such as www.baidu.com) When , First of all, I'll see hosts Does the file summary have information about this domain name IP A record of the address . If there is , Just visit the IP; If you don't query again DNS Server to request to resolve the domain name corresponding to IP Address .

5、fs File system static information ( Set the boot to mount the hard disk automatically )

/etc/fstab

explain :

First column :UUID Or device name

Second column : Mount point

The third column : Type of file system ext2 ext3 ext4 XFS

The fourth column : Mount parameters

The fifth column : Whether the backup

The sixth column : Check whether the disk is turned on

6、/etc/rc.local

Automatically run commands or scripts that are automatically executed when the machine is turned on , Set when the system starts init How the process sets up the system runlevel And load the relevant startup file settings

7、/etc/inittab

Run level profiles ( Some screenshots are omitted here )

explain :

0 - halt (Do NOT set initdefault to this)     To turn it off

1 - Single user mode     Single user mode

2 - Multiuser, without NFS (The same as 3, if you do not have networking)     Multi user mode without network service

3 - Full multiuser mode     Full command line multi user mode

4 – unused     Retain ( not used )

5 - X11     The graphical interface

6 - reboot (Do NOT set initdefault to this)         restart

8、/etc/sysconfig/i18n

The character set of the system

among en_US For English character set , Can be modified to Chinese character set zh_CN

9、SElinux The configuration file /etc/selinux/config

(SElinux It's a security mechanism , Please refer to the above for details )

10、ssh Service related profiles /etc/ssh/sshd_config

Example is CentOS 6.9 64 Bit version detailed ssh Service profile content

Because its encryption method is relatively safe and reliable , at present SSH Service is a common way of remote login .

SSH by Secure Shell Abbreviation , from IETF Network group of (Network Working Group) Established by ;SSH For the security protocol based on the application layer .SSH It is more reliable at present , A protocol designed to provide security for remote login sessions and other network services . utilize SSH The protocol can effectively prevent information leakage during remote management .SSH Initially UNIX A program on a system , It quickly expanded to other operating platforms .SSH In the correct use can be closed in the network vulnerability .SSH The client side works on a variety of platforms . Almost all UNIX platform — Include HP-UX、Linux、AIX、Solaris、Digital UNIX、Irix, And other platforms , All can run SSH.

The above listed Linux System configuration file is a relatively important and commonly used configuration file , It can be modified to play the required function . stay Linux Everything in the system is documented , stay Linux There are many configuration files in the system , For each service of the system , Application plays an important role .