侧边栏壁纸
博主头像
★街角晚灯★博主等级

博观而约取 厚积而薄发

  • 累计撰写 450 篇文章
  • 累计创建 183 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Ubuntu 修改网络配置命令

WinJay
2013-05-24 / 0 评论 / 0 点赞 / 125 阅读 / 2170 字 / 正在检测是否收录...
温馨提示:
文章发布较早,内容可能过时,阅读注意甄别。。。。

title: 'Ubuntu 修改网络配置命令' date: '2013-05-24T13:59:29+08:00'

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

address 212.215.161.94 IP地址 netmask 255.255.254.0 子网掩码 network 212.215.160.0 broadcast 212.215.161.255 gateway 212.215.160.1 网关 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 212.215.160.3 DNS重启网卡

root@Dev-srv:~# /etc/init.d/networking restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service networking restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop networking ; start networking. The restart(8) utility is also available.
networking stop/waiting
networking start/running

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区