Name Service interchange Configuration (/etc/nsswitch.conf) file
Every keyword in/etc/nsswitch.conf is a file name that can be/etc/nsswitch.conf controlled under the/etc/directory.
Aliases: Mail aliases
passwd: System User
Group: User Workgroup
Shadow: Encrypt password
Hosts: Host name
Networks: Network Name
Protocols: Network protocol
Services: Service Name
Ethers: Ethernet
RPC: Name of the remote process call
Netgroup: In-network Working Group
Files: In addition to Netgroup, valid for all other keywords
DNS: only meaningful for hosts
/etc/services is a network service configuration file that converts the network service name to a port number/protocol. Each line in the file corresponds to a service that consists of 4 fields that represent the service name, use port, protocol name, and service description.
/etc/resolv.conf is a DNS client configuration file that, when DNS client users need DNS resolution, sends a query request to the IP address defined by the NameServer statement in this file (the IP address of the DNS server). You can also set up a domain name that requires queries, etc.
Search domain name (eg:liu.com): Set the search domain to liu.com
nameserver IP Address (eg:192.168.1.1): Set the IP address of the DNS server to 192.168.1.1
Domain domain name (eg:li.com): Define local domain name
/etc/sysconfig/network is primarily used to set the hostname of the Linux system and whether the network card information is loaded when the system starts
Networking=yes: Indicates that the network IPV4 protocol is loaded at system startup
Hostname=liu.a.com: Indicates that the host name of the system is set to Liu.a.com
/etc/sysconfig/network-scripts/ifcfg-eth0 is the NIC information profile, including network interface devices, protocol type (static, dynamic), IP address, subnet mask, gateway, DNS server, and so on.
The contents of the static IP settings are as follows:
Device=eth0
Onboot=yes//Whether the network adapter information is loaded when the system is powered on
Bootproto=static
ipaddr=192.168.1.1
netmask=255.255.255.0
gateway=192.168.1.254
The contents of the dynamic IP settings are as follows:
Device=eth0
Onboot=yes
Bootproto=dhcp
This article from "Fancy" blog, reproduced please contact the author!
Linux Common network configuration file