Modify the network configuration file. by default, the ip address is automatically obtained. Sudovi/etc/network/interfaces file content: viewplainautoloifaceloinetloopbackmappinghotplugscriptgrepmapeth0autoeth0ifaceeth0ine...
Modify the network configuration file. by default, the ip address is automatically obtained.
Sudo vi/etc/network/interfaces
File content:
View plain
Auto lo
Iface lo inet loopback
Mapping hotplug
Script grep
Map eth0
Auto eth0
Iface eth0 inet static
Address 192.168.1.101
Netmask 255.255.255.0
Network 192.168.1.0
Broadcast 192.168.1.255
Gateway 192.168.1.1
If you want to access the Internet, modify the dns file:
Sudo vi/etc/resolv. conf
File content:
View plain
Nameserver 192.168.1.1 <------------- this line is added
Nameserver xxx. xx. xx. xxx <------------- this line is the original dns server
Restart the network module:
Sudo/etc/init. d/networking restart
OK. Now you can use the specified IP address normally.
Confused by the Author