Check the network configuration in Ubuntu Server by configuring www.2cto.com $ ifconfig to configure the DHCP client $ sudo vi/etc/network/interfaces add iface eth0 inet dhcp to configure the static IP address $ sudo vi/etc/network/ the configuration of interfaceseth0 is as follows: www.2cto.com auto eth0address 192.168.0.88netmask 255.255.255.0gateway 192.168.0.1 after the new configuration takes effect and is saved and exited, restart the networking command to make the new configuration take effect: $ sudo/etc/init. d/networking restart can also restart the NIC for the new configuration to take effect. The advantage is that it does not affect other network interfaces: $ sudo ifdown eth0 $ sudo ifup eth0 temporarily changes the IP address $ sudo ifco Nfig eth0 192.168.1.111 netmask 255.255.255.0 after the system restarts, the configuration in interfaces will be restored. There are two ways to set the Default Gateway: 1. Set it in the interfaces file. $ Sudo vi/etc/network/interfaces add gateway under eth0 configuration, such as: auto eth0iface eth0 inet staticaddress 192.168.1.123netmask 255.255.255.0gateway 192.168.1.12. directly use the command to set: Delete the current default gateway $ sudo route del default gw manually configure the default gateway $ sudo route add default gw 192.168.1.1 view route information $ route use this method, the modification takes effect immediately, after restarting, the settings in the interfaces file are valid. View the host name $ hosts temporary modification host name $ sudo hostname testserver takes effect immediately after the command is executed. Permanently change the host name $ sudo vi/etc/hostname to write the new host name. When the system restarts, the host name in the file is read. Configure the DNS server address. A maximum of three DNS servers can be used: $ sudo vi/etc/resolv. confnameserver 202. xx. xx. xxnameserver 192.168.1.1 pair "resolv. conf "changes take effect immediately. You can use the nslookup command to query the DNS server to verify the "resolv. conf" configuration file.