One, configure IP
Ubuntu's network configuration information is placed in the/etc/network/interfaces,
If the configuration dynamically obtains the IP, add the following to the above file:
Auto Eth0
Iface eth0 inet DHCP
If you configure a static IP, add the following:
Auto Eth0
Iface eth0 inet Static
Address 192.168.33.201
Netmask 255.255.255.0
Gateway 192.168.33.1
If the configuration is active, you need to restart the NIC:
Ifconfig eth0 Down
Ifconfig eth0 up
Not root, add sudo to the front of the command
If there is no successful configuration, you need to restart the network service
/etc/init.d/networking Restart or service networking restart
Second, configure the DNS server
Ubuntu DNS server information, placed in the/etc/resolv.conf,
Add a DNS server address, such as 202.112.125.53, in the file above
NameServer 202.112.125.53
Third, permanently modify the host name
It is also easier to permanently modify the hostname in the Ubuntu system. Host name in the/etc/hostname file, modify the host name, edit the hostname file, enter a new hostname in the file and save the file
/etc/hostname
Summary:
As long as the above steps are configured, you will be able to surf the internet, if not yet restart the machine to try.
This article is from the "Chen blog" blog, make sure to keep this source http://chenshengang.blog.51cto.com/4399161/1600573
Configuration of IP, DNS, hostname under Ubuntu