Linux下设置IP

Linux下设置IP

netstat -atn|grep "ES"   查看IP

局域网共享上网设置:/etc/network/interfaces,并将文件中的eth0修改成:

auto eth0
iface eth0 inet static
address 192.168.1.14
gateway 192.168.1.1
netmask 255.255.255.0

/etc/sysconfig/network-scripts/ifcfs-eth0

DEVICE=eth0
BOOTPROTO=none
onBOOT=yes
IPADDR=192.168.1.14
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
好!

不错啊

很适合新手!!