我们专注服务于当下互联网基础设施建设与云计算、大数据时代的各种需求!

Ubuntu_server常见操作

修改IP地址
[email protected]:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.2.8
gateway 192.168.2.1
netmask 255.255.255.0
#第2个地址
auto eth0:1  
iface eth0:1 inet static 
address 192.168.1.60
netmask 255.255.255.0 
network x.x.x.x  
broadcast x.x.x.x  
gateway x.x.x.x 

用下面的命令使网络设置生效:  
sudo /etc/init.d/networking restart 
#修改本地默认语言
[email protected]:~$ cat /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"