I am using Ubuntu via VirtualBox. I need to set proxy auto-configuration script. It works in FireFox but the global preferences-->network has no effect. So when I do "apt-get install" it is not able to download anything.

How can I tell the entire Ubuntu system that I want it to use the specified PAC file to configure proxy settings for any app that needs to connect to the internet?

apt-get install

doesn't do any installation , the correct syntax is:

apt-get install package_name

But did you see the output of that program in terminal ?

And setting proxy in firefox won't affect a global proxy settings , you may need to refer to Network Manager in Ubuntu.


the whole progress will be involved , e.g when install mscorettf-installer with wget

%> cat /etc/apt/apt.conf.d/00proxy 
Acquire {
    Retries "0";
    HTTP {
        Proxy "";
  • 1
    I used the full syntax. The terminal days it needs to download something but is stack at 0% probably since there is no network. What is Network Manager? I have opened preferences-->network in the ubuntu desktop and set the proxy script but this has no affect. – Yaron Naveh Aug 16 '11 at 17:27
  • see my update , i resolved this. – daisy Sep 5 '11 at 4:02
  • This is not system-wide. – einpoklum Dec 8 '19 at 15:28

You have to set the environment variable

export http_proxy=http://ip.addr.of.proxy:port

then enjoy your apt-get

  • 1
    how do I configure proxy configuration script (pac)? – Yaron Naveh Aug 18 '11 at 23:29
  • Too hard for the command line environment, I think. – inntran Aug 18 '11 at 23:56
  • But you can try to get a copy of that pac file, it's JavaScript, easy to understand. Then you can set the "http_proxy" accordingly. – inntran Aug 18 '11 at 23:58
  • 4
    this pac is highly complex and changes often. I need to configure it directly. it does not make any sense not to be able to do it, there is a ui option for it (which does not work) and every corporate needs it – Yaron Naveh Aug 19 '11 at 10:32
  • This would only work if 1. The PAC script simply told us to use a single proxy for everything, always and 2. The PAC script never changed. – einpoklum Dec 8 '19 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.