Linux设置网卡信息

建议通过终端字符方式下来修改
一修改IP地址
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
IPADDR=192.168.1.33
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
~

二修改网关
vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=Shawn
GATEWAY=192.168.1.1

三重新启动网络配置
/etc/init.d/network restart

Leave a Reply

Your email address will not be published. Required fields are marked *