辛夷坞

涧户寂无人,纷纷开且落

By - Christen

Linux 修改网络配置

Linux 修改网络配置,包括 IP GATEWAY DNS:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Linux下修改网络设置后无需重启计算机,只需要重新启动相关的设置选项即可,网络设置修改之后,如果是Redhat,重启网络可以输入:

service network restart

或者

/etc/rc.d/init.d/network restart


查看网络:

cat /etc/sysconfig/network-scripts/ifcfg-eth0

输出:

DEVICE="eth0"
BOOTPROTO=none
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="ee76076e-878a-4d04-a5bb-0566a8261d80"
IPADDR=192.168.98.175
PREFIX=23
GATEWAY=192.168.99.254
DNS1=192.168.90.252
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME="System eth0"
HWADDR=00:0C:29:18:01:59
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
LAST_CONNECT=1426207817

1 thought on “Linux 修改网络配置

Christen March 13, 2015 at 11:42 am

决定在原来的 Windows 7 系统中,运行 Redhat Linux AS,复习 Linux。
正如曾子言:传不习乎?

Reply

Leave a Reply

Your email address will not be published.
*
*