树莓派做网络代理_【树莓派】设置代理服务器联网

有时候在内网中使用树莓派,需要使用代理才能连接外网。但是命令行下面又不像windows机器上面浏览器设置一下那么容易。有没有能够在命令行下面设置代理服务器的方法呢,答案是肯定的,下面是设置步骤:

1,编辑配置文件:

vi ~/.bashrc

2,文件内容(红色为添加内容,格式形如http://easwy:123456@192.168.1.1:8080):

# ~/.bashrc: executed by bash(1) for non-login shells.

# Note: PS1 and umask are already set in /etc/profile. You should not

# need this unless you want different defaults for root.

# PS1=’${debian_chroot:+($debian_chroot)}\h:\w\$ ‘

# umask 022

# You may uncomment the following lines if you want `ls’ to be colorized:

# export LS_OPTIONS=’–color=auto’

# eval “`dircolors`”

# alias ls=’ls $LS_OPTIONS’

# alias ll=’ls $LS_OPTIONS -l’

# alias l=’ls $LS_OPTIONS -lA’

#

# Some more alias to avoid making mistakes:

# alias rm=’rm -i’

# alias cp=’cp -i’

# alias mv=’mv -i’

3,应用修改:

source ~/.bashrc

OK,现在你已经可以通过命令行安装软件,获取更新了。:)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值