Ubuntu下手動配置IP的方法

/etc/network/interfaces 是網絡配置文件

修改該文件:

  1. auto lo 
  2. iface lo inet loopback 
  3.  
  4. iface eth0 inet static 
  5. address 192.168.2.88 
  6. netmask 255.255.255.0 
  7. gateway 192.168.2.2 
  8. auto eth0 

即配置接口eth0的ip,配置後重啓網卡,

  sudo ifdown eth0

  sudo ifup eth0

輸入: ip a  查看eth0的信息

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章