I'm using my college network.Here i have set proxy to 10.30.0.1:8080 to access internet.But i'm not able to set proxy in Raspberry Pi 3.
Navigate to the following folder as follows:
Create a file called
sudo nano 10proxy
Without authentication add this line:
Or with authentication add this line:
Make sure to include the
/ at the end.
For everything else:
Edit this file:
sudo nano /etc/environment
Add this line (with authentication):
Or without authentication:
The proxy on any Linux environment can be set using two files
/etc/apt/apt.conf.d/01proxy (sometimes this file doesnt exist so create one)
now firstly see what are the default setting in these two files using cat command
1.cat /etc/environment ==> create a backup if something goes wrong
using a simple bash script you can disable or enable proxy for terminal written by me : https://github.com/k1941996/Proxy_switcher/blob/master/switch_proxy.txt
simply change the proxy according to your network.
Add these files in your .bashrc file and you can directly switch proxy using simple commands like enableproxy and disableproxy