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 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
up vote 18 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 '15 at 8:52
URL encoding from here: worked for me, see here:… Tested on Ubuntu 10.04.4 LTS. – AjayKumarBasuthkar Oct 27 '15 at 6:35

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

If your password or username contains @ you can percent-encode (also referred as URL encoding) it as %40 in the proxy url. For more special characters see here

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.