比如网卡eth0 编辑/etc/sysconfig/network-scripts/ifcfg-eth0 下面是我的文件内容
DEVICE=eth0 HWADDR=08:00:27:2F:E3:46 TYPE=Ethernet UUID=1175a836-da85-4c93-88f0-d60489bf2116 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static DNS1=192.168.0.1 IPADDR=192.168.0.115 NETMASK=255.255.255.0 GATEWAY=192.168.0.1