[[Email protected]~]# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0 # NIC name
Bootproto=static # Static IP Address Acquisition Status such as: DHCP indicates auto get IP Address
ipaddr=192.168.186.128 #IP Address
netmask=255.255.255.0 # Subnet Mask
Onboot=yes # whether to activate at boot time
gateway=192.168.1.1
Modify Linux System of Host name :
[[Email protected]~]# vi/etc/sysconfig/network
Hostname=cuilong # Modify host name, restart effective
gateway=192.168.1.1 # Modify the default gateway , if the above eth0 If the gateway is not configured, the gateway is used by default.
Modify Linux of the DNS
[[Email protected]~]# vi/etc/resolv.conf # Modify DNS Information
NameServer 192.168.1.1
after the configuration is complete, restart the network card with 3 Medium Method:
1 , #ifup eth0
2 , #service Network Restart
3 , #/etc/init.d/network Restart
This article from "Clay Turtle" blog, declined reprint!
Linux modified IP address, network management, hostname, DNS