转自:http://www.cnblogs.com/LixingTie/archive/2010/07/15/1778084.html

在Ubuntu下查看IP的命令为ifconfig

 

设置固定IP地址

sudo vim /etc/network/interfaces
修改iface eth0 inet dhcp 为 iface eth0 inet static  
并在这句后添加
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254

保存退出后使用如下命令重启网络服务
/etc/init.d/networking restart

相关文章:

  • 2022-12-23
  • 2021-11-05
  • 2022-01-02
  • 2022-01-21
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2021-07-06
  • 2021-09-11
  • 2021-10-15
  • 2021-05-12
  • 2021-09-19
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案