自动获取IP

dhclient eth1

临时设置ip地址

ifconfig eth0 192.168.1.112/24 设置IP和子网掩码

route add default gw 192.168.1.1 设置网关地址

echo nameserver 192.168.1.1 > /etc/resolv.conf 设置DNS地址

/etc/init.d/networking restart 重启网卡

设置静态 IP

ifconfig -a 查看所有网卡

vi /etc/network/interfaces 编辑ip地址

auto eth0

#iface eth0 inet dhcp

iface eth0 inet static

address 192.168.1.112 IP地址

netmask 255.255.255.0 子网掩码

network 192.168.1.0 网络地址

broadcast 192.168.1.255 广播地址

gateway 192.168.1.1 网关地址

/etc/init.d/networking restart 重启网卡

vi /etc/resolv.conf 编辑DNS

update-rc.d networking defaults 设置系统启动后自动启用网卡

无线网络设置

/etc/init.d/wicd start 启动wicd

原文:http://3389.in/838.html