Some local area network environment needs to use proxy to surf the internet, the graphical interface is very good to solve the browser to set up the proxy is good, but the Linux pure command line interface needs to be manually configured.
If you want the global user to use all shells, you need to modify the/etc/profile file
# Vi/etc/profile
Add the following configuration to the file
http_proxy=proxy.abc.com:8080
https_proxy= $http _proxy
ftp_proxy=user:password@proxy.abc.com:8080
no_proxy=*.abc.com,10.*.*.*,192.168.*.*,*.local,localhost,127.0.0.1
export http_proxy https_proxy ftp_proxy No _proxy
which
Http_proxy:http protocol uses proxy server address;
The HTTPS_PROXY:HTTPS protocol uses the security proxy address;
FTP_PROXY:FTP protocol uses proxy server address;
User: The username used by the agent;
Password: The agent uses the username password;
Proxy.abc.com: Proxy address, can be IP, can also be domain name;
8080: the port used;
No_proxy: A host or IP that does not use a proxy.
Save exit, log out of the login system can take effect.
This method is only suitable for configuring HTTP proxies, and there are other configuration methods that use the socket agent to access the Internet.