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

转载于:https://www.cnblogs.com/yernhi/p/10224072.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值