Linux Collection:网络配置

PAS 缺少ifconfig

安装相应软件【不推荐】,尽量使用 ip 命令

sudo apt install gnome-nettool

补充,显示IP地址:

ip show address


PAS 配置无线网卡

lsmod | grep iw
sudo apt install firmware-iwlwifi wireless-tools
sudo modprobe iwl4965
reboot


PAS 没有网络(左上角没有网络图标)

重新启动GUI版的网络管理服务程序network-manager

sudo service network-manager restart
  • 手动配置网络
    修改文件/etc/network/interfaces(Debian/Ubuntu)
  • 静态IP,添加如下,其中eth0是网络名, dns-nameserver不一定要有:
auto eth0
iface eth0 inet static
address 192.168.1.123
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameserver 1.1.1.1
  • 动态IP
auto eth0
iface eth0 inet dhcp

然后,重启服务:

sudo /etc/init.d/networking restart


PAS HTTP 代理命令行在sudo中无法访问

通常设置代理:

http_proxy=host_IP:port
https_proxy=$http_proxy
export http_proxy https_proxy   

如果全局可用,保存到/etc/profile目录中。

缺点:
使用sudo命令无法访问代理;使用sudo -i 进入root用户模式,

参考: https://blog.csdn.net/u014789266/article/details/76571763

猜你喜欢

转载自www.cnblogs.com/yernhi/p/10224072.html