Define the http_proxy variable in the format http://host:port/. If you have to login then use the format http://username:password@host:port/. To define this variable add the following lines to the root login file /root/.bashrc.
http_proxy=http://username:password@host:port/
export http_proxy
To use the proxy only user specific define the variables in the file ~/.bash_profile or ~/.profile. If the file ~/.bash_profile exists the file ~/.profile will ignored by the Bash (Standard-Shell). The settings in ~/.bashrc overwrite ~/.profile, too.
To use changes of the file ~/.profile without a restart you can use the following command:
source ~/.profile
Image may be NSFW.
Clik here to view.

Clik here to view.
