Configure a proxy on Debian or Ubuntu with @ in the user login or password

January 2017

When using a freshly installed Debian, users willing to connect to a proxy to surf the net (commonly used by professionals in a business environment) are confronted by two concerns related both to one thing: the @ sign is interpreted by the terminal as as a separator and not as part of the login or password. Some companies make use of logins in the following format "" and it is therefore important for the system to consider the @ sign as part of the login. If your password contains an @, the sign will be interpreted as a separator and your password will be truncated.

Here are the solutions:
  • In all cases, the command lines must be entered in the terminal:
  • If you have permission errors, switch to root
    • su root
  • or
    • sudo

In the case of a normal proxy where authentication can be done with a short name (for example, domain\user)
the syntax is:
export http_proxy=http://[DOMAIN\]USERNAME:PASSWORD@SERVER:PORT        

When the login has the @ symbol:
  • replace the @ sign with \@

export http_proxy=http://EMAIL\@DOMAIN.COM:PASSWORD@SERVER:PORT        
export ftp_proxy=http://EMAIL\@DOMAIN.COM:PASSWORD@SERVER:PORT  

When the password has the @ symbol:
  • replace the @ sign with replace the @ sign with \@

 export http_proxy=[http://][DOMAIN\]USERNAME:P%40SSWORD@SERVER:PORT         
 export ftp_proxy=[http://][DOMAIN\]USERNAME:P%40SSWORD@SERVER:PORT


Published by deri58. Latest update on October 25, 2012 at 06:36 AM by Jeff.
This document, titled "Configure a proxy on Debian or Ubuntu with @ in the user login or password," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (