May 2025
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Categories

May 2025
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Add Proxy Server on Linux and Unix Server

When you need to have proxy connection available to whole system, so dont bother with settings for firefox, yum proxy and similar, its simple as just plain file 😉

just copy & paste following code to terminal window. if you need other shell , like csh , just add another file with csh extension.
This should work for every user on system.

/bin/cat < /etc/profile.d/proxy.sh
export http_proxy=http://host.name:port/
export ftp_proxy=http://host.name:port/
export HTTP_PROXY=http://host.name:port/
export FTP_PROXY=http://host.name:port/
export no_proxy=.localdomain.com
EOF
In case , that you want enable proxy access to only specific user, just add lines to his bash-profile file
echo “export http_proxy=http://hostname.or.ip:port” >> /user_home/.bash_profile
just change hostname/ip to your hostname/ip of proxy server eg. myproxy.company.sk:8080

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>