Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Ubuntu 12.04 LTS using the Windows installer (Wubi) yesterday. And then I tried to install Chrome, Flash player, etc., but nothing worked. Then I tried installing some random package using the Software Center (to see if it would work), and that didn't work either. Most of the times it shows updating cache but nothing happens thereafter. Sometimes I get a message saying that it failed to download repository (I don't know what this means) and telling me to check my Internet connection.

I am using my institutional LAN network with a proxy requiring authentication with a username and password. Firefox is working fine...!

I browsed the Internet for solutions and I tried many commands in the Terminal but nothing worked. Today I uninstalled and then freshly installed it again, and then the first thing I did is to ask this question here. So plz help me... give me a step by step procedure to conquer Ubuntu.

share|improve this question
@EliahKagan: i have a automatic proxy url and i updated it in the network proxy option and apply it for all sysytem. but still everything is same. – Neeraj Jun 13 '12 at 7:17
@Neeraj This answer should solve your problem. I'm hoping there is some way to do this in the Software Center or using graphical tools (and not manually editing configuration files), and that someone can post that as an answer here. Otherwise, this will probably get marked a duplicate of that or some other related question. Either way, if you need a solution now, that should work. – Eliah Kagan Jun 13 '12 at 7:38
@EliahKagan thanks but sorry... i didnt understand wat to do... wch of those comands i should use and wer?? – Neeraj Jun 13 '12 at 7:52
@Neeraj gksudo gedit /etc/apt/apt.conf.d/01proxy and (later) sudo apt-get update are the only commands in that answer. The lines that start with Acquire::http::Proxy are lines you add to the file that you open or create by running the first command (but you must modify them to fit your specific situation--the first half of the answer explains the meaning of everything in them, so you can do that). – Eliah Kagan Jun 13 '12 at 7:56
now wat should i type into the text editor? – Neeraj Jun 13 '12 at 8:07

I set the proxy details in System > Network and applied them system wide but I was unable to use the Software Center (Firefox was fine). I read in another question here somewhere that a user did sudo gedit /etc/apt/apt.conf and put in Acquire::http::proxy "http://user:pass@proxy:port" even though he didn't use a username and a password for the proxy and it worked for him.

I DO need to enter a username and a password, and my actual username and password entered in that string wouldn't work, BUT when I just put in the actual words user:pass the Software Center started working!

share|improve this answer

enter following command in terminal sudo gedit /etc/apt/apt.conf put the below line in file opened above i.e apt.conf

Acquire::http::Proxy"http://user:password@proxy:port"; //sample //Acquire::http::Proxy"http://ravi:bnmp123@";

//user,password are internet user id and passowrd //same way do it for https,ftp

share|improve this answer
What if you don't have an apt.conf in /etc/apt/? – Kevin Meredith Aug 27 '12 at 16:45

Same problem in 14.04 - however the configuration is different (there is no 01proxy file nor commented out proxy info in the configuration), in directory


I added a file named 40proxy with contents:

Acquire::http::proxy "==same proxy example as other comments==";

Where I replaced the proxy with my proxy name and port number, this solved issue, and enabled Software Center to work (actually install packages).

share|improve this answer

I also had the same problem... my proxy was and port xxxx and no userid and pass was required..i just turned off Airplane mode > dash>network and now everything is working fine

share|improve this answer
With Airplane mode you kill all networking connection, so nothing will be working anyway. – gertvdijk Jul 26 '13 at 16:08

protected by Community May 9 '14 at 21:10

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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