注意事项

我是在TX2 ubuntu18.04上改的固定IP地址,其他主机上ubuntu18.04好像需要另一种方法,需要你自己去百度上搜

参考博客

https://blog.csdn.net/a13662080711/article/details/80906918

操作步骤

  1. 打开一个终端,在终端中输入
sudo vim /etc/network/interfaces
  1. 新开一个终端,在终端里输入
ifconfig

查看你的网卡名是什么
例如下图,我的是eth0(如果是别的就把eth0换掉就可以)
TX2 ubuntu18.04 改固定IP地址 eth0无本机IP

  1. 在之前打开的interfaces文件里输入(之前文件里的内容注释掉)
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.8.100
netmask 255.255.255.0
# dns-nameserver 8.8.8.8
dns-nameserver 8.8.8.8
  1. 重启网络
sudo /etc/init.d/networking restart

相关文章:

  • 2021-11-29
  • 2021-07-14
  • 2021-12-17
  • 2021-11-28
  • 2021-07-06
  • 2021-11-19
  • 2021-04-29
猜你喜欢
  • 2021-05-06
  • 2021-05-24
  • 2021-04-13
  • 2021-08-02
  • 2022-01-07
  • 2021-11-29
  • 2021-07-21
相关资源
相似解决方案