码迷,mamicode.com
首页 > 系统相关 > 详细

Linux [网络配置]

时间:2014-07-24 21:35:02      阅读:288      评论:0      收藏:0      [点我收藏+]

标签:os   文件   re   c   linux   window   res   windows   

查看接口信息 ifconfig (-a 所有 /  eth0 查看特定网卡)

lo接口:环回接口,操作系统自带

 

打开关闭相应网卡接口 ifup ifdown    (ifup eth0)

 

setup命令配置 (基于命令行的文本界面),想windows配置一样,填空   (redhat only? my ubuntu don‘t have use sysv-rc-conf,sudo apt-get install sysv-rc-conf to install)

 

配置文件

网卡(eth0):/etc/sysconfig/network-scripts/ifcfg-eth0 (redhat, Fedora)    /etc/network/interfaces (Ubuntu, like other Debian)

DNS:/etc/resolv.conf 

主机名:/etc/sysconfig/network (redhat, Fedora) 

静态主机名:/etc/hosts (redhat, Fedora) 

 

测试网路联通:

ping ...

 

检查DNS:

host www.google.com

dig www.google.com (详细)

 

显示路由表:

ip route

 

跟踪路由:

traceroute www.google.com  (有些router是追踪不到的 ×××)

 

检测网络质量:

mtr www.google.com

 

修改主机名:

临时 hostname myhost

永久 /etc/sysconfig/network   HOSTNAME=myhost (Redhat)    /etc/hostname(Ubuntu)

Linux [网络配置],布布扣,bubuko.com

Linux [网络配置]

标签:os   文件   re   c   linux   window   res   windows   

原文地址:http://www.cnblogs.com/ethanchou/p/3865996.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!