ubuntulinux:使用命令设置Ubuntu Linux系统的IP地址



  1. 检验是否可以连通就使用ping命令ping 网关
 
  开始时候总是现实unreachable
 
  2. 设置IP
 
  sudo config eth0 133.133.133.190 netmask 255.255.255.0
 
  这样就算设置好了网卡eth0IP地址和子网掩码
 
  3. 设置网关 sudo route add default gw 133.133.133.40
 
  4. ping 网关就可以ping通了
 
  5. 设置DNS 修改/etc/resolv.conf在其中加入
 
  nameserver DNS地址1
 
  nameserver DNS地址2
 
  完成
 
  这样设置的后下次开机时候似乎IP又会发生变化
 
Tags:  ubuntulinux教程 ubuntulinux安装 ubuntulinux8.10 ubuntulinux

延伸阅读

最新评论

发表评论