Running Commands behind Proxy

How to run Linux Commands like apt,wget,git,pip etc behind a proxy

2 min readDec 27, 2021


Most of the Companies use some kind of proxy(like squid proxy) to monitor,filter the internet traffic out of then Internal Network. Usually this works OK, but sometimes some tools which we will list below cannot be downloaded until use the proxy address. This write-up is a collection of some of these tools and commands to help us to download the tools.Assumption here is that you already know the IP Address:Port where the proxy is running and you are running these commands as “root”.

Git behind a proxy

First set the proxy and then run the git clone command:

export https_proxy=export https_proxy=
git clone

These are example IP Address and git repo, replace them with what you own proxy IP and Port and the repo.

Apt behind a proxy


http_proxy= apt update
http_proxy= apt install clang-9 — install-suggests

Wget behind a proxy




Software Developer having keen interest in Security, Privacy and Pen-testing. Certs:- Security+,PenTest+,AZ900,AZ204,AZ500