Debian下vi错位如何解决

2023-05-21,

本篇内容主要讲解“Debianvi错位如何解决”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Debian下vi错位如何解决”吧!

1、设置IP地址、网关

nano /etc/network/interfaces /etc/network/interfacesbak #备份原有配置文件
nano /etc/network/interfaces #编辑网网卡配置文件
auto lo
auto eth0 #开机自动连接网络
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ip
address192.168.21.166 #设置ip地址
netmask255.255.255.0 #设置子网掩码
gateway192.168.21.2 #设置网关
ctrl+o #保存配置
ctrl+x #退出

2、设置dns

cp /etc/resolv.conf /etc/resolv.confbak #备份原有dns配置文件
nano /etc/resolv.conf #编辑配置文件
nameserver8.8.8.8 #设置首选dns
nameserver8.8.4.4 #设置备用dns
ctrl+o #保存配置
ctrl+x #退出

3、重启网络

service networking restart #重启网络

到此,相信大家对“Debian下vi错位如何解决”有了更深的了解,不妨来实际操作一番吧!这里是本站网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

《Debian下vi错位如何解决.doc》

下载本文的Word格式文档,以方便收藏与打印。