Set/Export: http_proxy With Special Characters In Password Under Unix / Linux

www‮tual.‬turi.com
Set/Export: http_proxy With Special Characters In Password Under Unix / Linux

To set the http_proxy environment variable with special characters in the password on a Unix or Linux system, you will need to use single quotes to enclose the password.

The http_proxy environment variable specifies the URL of the proxy server that should be used for HTTP requests. The format of the URL is http://user:password@proxy_server:port/.

For example, to set the http_proxy variable with the username user, password p@ssw0rd, and proxy server proxy.example.com on port 3128, you can use the following command:

export http_proxy='http://user:p@ssw0rd@proxy.example.com:3128/'

This will set the http_proxy variable with the specified username, password, proxy server, and port.

You can also use the set command to set the http_proxy variable in the csh and tcsh shells.

For example:

setenv http_proxy 'http://user:p@ssw0rd@proxy.example.com:3128/'

This will set the http_proxy variable with the specified username, password, proxy server, and port in the csh or tcsh shells.

Keep in mind that the http_proxy variable will only be set for the current session. To set the http_proxy variable permanently, you will need to add the export or setenv command to your shell configuration file (e.g., ~/.bashrc, ~/.cshrc, etc.).

Created Time:2017-10-30 14:27:18  Author:lautturi