Monday, August 16, 2021

Proxy to Command-line

These proxy server settings are used by the almost all Linux command-line utilities: ftp, wget, curl, ssh, apt, pacman, yum and others.

 

Edit the file /etc/profile and add this lines:


# vi /etc/profile

http_proxy="http://myproxy.com:port"
HTTP_PROXY="http://myproxy.com:port"
https_proxy="http://myproxy.com:port"
HTTPS_PROXY="http://myproxy.com:port"
ftp_proxy="http://myproxy.com:port"
FTP_PROXY="http://myproxy.com:port"


Save.


Edit the file /etc/environment and add this lines:

# vi /etc/enviroment

http_proxy="http://myproxy.com:port"
HTTP_PROXY="http://myproxy.com:port"
https_proxy="http://myproxy.com:port"
HTTPS_PROXY="http://myproxy.com:port"
ftp_proxy="http://myproxy.com:port"
FTP_PROXY="http://myproxy.com:port"


Save.

Restart the system.

No comments:

Post a Comment