Jan's answer is good, the environment variable http_proxy
is read by many programs, e.g. wget
. You can add this
export http_proxy="http://@${proxyserver}:${port}"
to your ~/.bash_profile
.
Also yum
works, but you can also specify it in /etc/yum.conf
.
Other programs can be configured similarly (e.g. git
in ~/.gitconfig
, chromium --proxy-server=host:port
).
Some programs do not read this environment variable, e.g. svn
. You need to proxify
them. This works by replacing shared network libraries with proxified versions, which route traffic through the proxy. E.g. proxychains
or tsocks
.
Your best source for each program is to open the manual and search for proxy
.
btw, the reason your own attempt failed, was that you must not use a space between http_proxy
and =..
, otherwise you cannot declare that variable (bash thinks it is a command, but doesn't find a matching one in your $PATH
.).