配置静态ip
-
查看用的是哪张网卡
ifconfig我的是eno1
-
打开需要配置的文件
sudo gedit /etc/network/interfaces将下面这段代码加在文件最后面,其中要替换成自己的网卡、ip地址、子网掩码等
auto eno1 iface eno1 inet static address 10.xxx.xxx.xxx #ip地址 netmask 255.xxx.xxx.x #子网掩码 gateway 10.xxx.xxx.x #网关 dns-nameservers 10.xx.xx.xx #有几个写几个 dns-nameservers 10.xx.xx.xx dns-nameservers 10.xx.xx.xx -
刷新静态ip
sudo ip addr flush eno1sudo systemctl restart networking.service
配置proxy端口(学校不需要)
-
打开需要配置的文件
sudo gedit /etc/profile -
将下面这段代码加在文件最后面,其中username是你的用户名,key为密码,domain为域名,port为端口号
export http_proxy=http://username:key@domain:port export https_proxy=http://username:key@domain:port export ftp_proxy=http://username:key@domain:port</

本文详述了在Ubuntu系统中配置静态IP、设置Proxy端口的步骤,包括学校和公司环境的不同处理。在公司环境中,遇到DNS问题,需要在系统设置和网络编辑中再次配置DNS。而在学校环境中,通过远程连接解决DNS问题,避免手动修改被覆盖。
最低0.47元/天 解锁文章
2400

被折叠的 条评论
为什么被折叠?



