Online there are many post which tell different ways to add proxy in Linux . but i want to know best way add proxy and proxy authentication in Linux specially Linux mint . because i already try /etc/apt/apt.conf to add or /etc/apt/apt.conf.d/environment but my terminal doesn't connect so does Firefox . there are network setting option where we can proxy that also doesn't work.
1 Answer
1 : Open a terminal window and type the following command
sudo gedit /etc/environment2 : Copy the following lines in your /etc/environment file and modify accordingly.
http_proxy= https_proxy= ftp_proxy= no_proxy="localhost,127.0.0.1" HTTP_PROXY= HTTPS_PROXY= FTP_PROXY= NO_PROXY="localhost,127.0.0.1"3 : save your changes and log-out and log-in.
4 : If your apt-get command is still not able to access internet,execute
sudo gedit /etc/apt/apt.conf.d/95proxiesand copy the following lines and modify accordingly
Acquire::http::proxy "";
Acquire::ftp::proxy "ftp://user:password@proxy:port/";
Acquire::https::proxy "";5 : once again save your changes and log-out and log-in.
P.S : You may have to delete /etc/apt/apt.conf.d/environment. It is not a place to store the environment variables. Moreover there is no such file on my system.