学无先后,达者为师

网站首页 编程语言 正文

NVIDIA jetson nano/ Linux/ Ubuntu18.0.4 配置固定IP静态IP永久IP

作者:别出BUG求求了 更新时间: 2023-11-21 编程语言

1. check一下自己当前网络

ifconfig

在这里插入图片描述
分别是ip、子网掩码

2. 创建eth0文件

cd /etc/network/interfaces.d
sudo vi eth0

在文件中加入如下内容:

auto eth0
iface eth0 inet static
address 192.168.0.158
netmask 255.255.255.0
gateway 192.168.0.1

设置:
自己设定的ip地址
子网掩码
网关——默认为上述

3. 修改/etc/network目录下的interfaces文件,增加一行代码source interfaces.d/eth0 前面三行是本来就有的,第四行是新加的。

cd ..
sudo vi interfaces

增加:

source interfaces.d/eth0

即可
在这里插入图片描述

4. 重启完成配置

sudo reboot -h now

——————路由器查看后,成功设置!————————

原文链接:https://blog.csdn.net/weixin_39589455/article/details/121512725

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新