Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I want to update ubuntu 11.04 throught apt-get. So I added the following lines in apt.conf

export http_proxy=
export ftp_proxy=http://username:password@proxyserver.netport/

export http_proxy=http://deepak:Deepak@123@

My question is: how do I insert special characters to a username or password?

For instance: my password for proxy is Deepak@123 and it is getting an error.

share|improve this question
Er... is that really your password? –  Nathan Osman Oct 18 '11 at 5:10
You can export proxy settings in .bashrc. In apt.conf you have to use this –  Abhay Rana Oct 18 '11 at 5:16

3 Answers 3

up vote 17 down vote accepted

You need to escape special characters. So place a \ in front of the @ like so:

export http_proxy=http://deepak:Deepak\@123@

Alernatively you can also use %40.

share|improve this answer
Full list of HTML character codes –  BBK Dec 24 '13 at 11:15
An online encoder / decoder : –  Jean-Rémy Revy Sep 10 '14 at 16:06
inside /etc/apt/apt.conf %40 works –  albfan Apr 7 at 8:52

If your password or username contains @ you can percent-encode it as %40 in the proxy url.

share|improve this answer

Click on

  1. Dash home
  2. Search for System Settings
  3. Select Network
  4. Select Network Proxy
  5. Select Manual method
  6. Set you proxy and port

Kudos You are Done if you set right

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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