本帖最后由 鱼花 于 2021-8-15 17:04 编辑
静态IP
在debian下的hqplayer embedded现打算固定下ip
查看网络情况
得知我的网卡名叫:eno1
先备份原有配置文件
- cp /etc/network/interfaces /etc/network/interfacesbak
复制代码
可以用nano命令打开配置文件,或xftp 选中文件后右键“用记事本编辑”
原来配置(interfacesbak) 不是执行
- # This file describes the network interfaces available on your system
- # and how to activate them. For more information, see interfaces(5).
- source /etc/network/interfaces.d/*
- # The loopback network interface
- auto lo
- iface lo inet loopback
- # The primary network interface
- allow-hotplug eno1
- iface eno1 inet dhcp
复制代码
需要改为的配置新的interfaces,不是执行
- # This file describes the network interfaces available on your system
- # and how to activate them. For more information, see interfaces(5).
- source /etc/network/interfaces.d/*
-
- # The loopback network interface
- auto lo
- iface lo inet loopback
- # The primary network interface
- allow-hotplug eno1
- iface eno1 inet static
- address 192.168.1.177
- netmask 255.255.255.0
- broadcast 192.168.1.255
- gateway 192.168.1.1
复制代码
执行
- /etc/init.d/networking restart
- ifdowon eno1
复制代码 然后网会断了,得hqe 主机接上键盘,显示器执行
|