Ubuntu – Linux command line to turn off proxy

bashPROXYUbuntu

Can you show me the command line to turn off proxy when I am using the command line terminal in Ubuntu?

Best Answer

As the other answer says there are some programs that don't look at the system at all you may have to set them up individually. For instance wget has a number of proxy options, that can be used to ignore or adapt the environmental proxy config during execution. Here are a number of areas in which the systems proxys can be set up.

  • How my system looks, note that you will have to change the specifed system configuration for you networking Environment.

Some Linux systems use /etc/environment

$ cat /etc/environment 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
http_proxy="http://192.168.1.250:8080/"
ftp_proxy="ftp://192.168.1.250:8080/"
https_proxy="https://192.168.1.250:8080/"  

There is no uniform single set up other use env

$ env | grep -i proxy
NO_PROXY=localhost,127.0.0.0/8,127.0.1.1
http_proxy=http://192.168.1.250:8080/
FTP_PROXY=ftp://192.168.1.250:8080/
ftp_proxy=ftp://192.168.1.250:8080/
all_proxy=socks://192.168.1.250:8080/
ALL_PROXY=socks://192.168.1.250:8080/
HTTPS_PROXY=https://192.168.1.250:8080/
https_proxy=https://192.168.1.250:8080/
no_proxy=localhost,127.0.0.0/8,127.0.1.1
HTTP_PROXY=http://192.168.1.250:8080/  

I would check out the ~/.bashrc to have setting applied automatically on system start up.

$ man env
$ man set
$ # The file section near the end of the bash manual.
$ man bash 

FILES
       /bin/bash
              The bash executable
       /etc/profile
              The systemwide initialization file, executed for login shells
       /etc/bash.bashrc
              The systemwide per-interactive-shell startup file
       /etc/bash.bash.logout
              The systemwide login shell cleanup file, executed when  a  login
              shell exits
       ~/.bash_profile
              The personal initialization file, executed for login shells
       ~/.bashrc
              The individual per-interactive-shell startup file
       ~/.bash_logout
              The  individual  login shell cleanup file, executed when a login
              shell exits
       ~/.inputrc
              Individual readline initialization file