Ubuntu 网络配置
来源:互联网 发布:淘宝卖家批量发货 编辑:程序博客网 时间:2024/05/17 05:14
ubuntu虽然有个network manager,但是设置之后似乎不管用,最好使用文件配置。分为设置ip和设置dns两步。
第一步,设置ip。
用root权限编辑文件/etc/network/interfaces
auto lo
iface lo inet loopback
#这两行一般都有,不需要更改。
auto eth0
iface eth0 inet static
#这两句表示eth0使用静态ip地址(static)。如果是动态获取ip地址,那么将static改成dhcp,后面的ip地址就不用设置了。
#如果是无线网络需要设置,那么对应的,将eth0改成wlan0
#如果需要更改mac地址
hwaddress ether xx:xx:xx:xx:xx:xx
#ip地址
address x.x.x.x
#网关
gateway x.x.x.x
#掩码
netmaskx.x.x.x
#将dns设置在这里,似乎没有作用
dns-nameserver x.x.x.x
nameserver x.x.x.x
nameserver x.x.x.x
第一步,设置ip。
用root权限编辑文件/etc/network/interfaces
auto lo
iface lo inet loopback
#这两行一般都有,不需要更改。
auto eth0
iface eth0 inet static
#这两句表示eth0使用静态ip地址(static)。如果是动态获取ip地址,那么将static改成dhcp,后面的ip地址就不用设置了。
#如果是无线网络需要设置,那么对应的,将eth0改成wlan0
#如果需要更改mac地址
hwaddress ether xx:xx:xx:xx:xx:xx
#ip地址
address x.x.x.x
#网关
gateway x.x.x.x
#掩码
netmaskx.x.x.x
#将dns设置在这里,似乎没有作用
dns-nameserver x.x.x.x
第二步,设置dns
用root权限编辑/etc/resolv.conf
#添加dnsnameserver x.x.x.x
nameserver x.x.x.x
重启网络服务
#cd /etc/init.d
#./networking restart 0 0
- ubuntu 网络配置
- ubuntu 网络配置
- Ubuntu配置网络
- Ubuntu简单网络配置
- ubuntu linux网络配置
- ubuntu-网络配置
- Ubuntu Server 网络配置
- Ubuntu网络配置
- ubuntu配置网络
- Ubuntu - 修改网络配置
- Ubuntu有线网络配置
- ubuntu: 配置网络方法
- ubuntu网络配置
- Ubuntu网络配置命令
- Ubuntu 10.04 网络配置
- Ubuntu网络配置
- ubuntu网络连接配置
- ubuntu网络配置
- BUPT OJ210 Rist-Number
- 为什么要使用面向接口编程
- Oracle之sqlplus输出到html
- IEEE地址和网络地址
- 翻转字符串的解法
- Ubuntu 网络配置
- android Activity的Task Affinity lanchMode
- Android视频录制命令screenrecord
- 银行排队模拟
- ORA-01455报错的问题探究
- python文件读写操作
- 外企面试注意事项
- 设置窗体的起始位置,并检查配置文件是否存在,存在使用配置文件,不存在创建配置文件,在每次打开窗体时保持窗体上一次关闭的位置。
- 一个外企资深工程师的对编程的感悟