How to use Arch Linux pacman through a proxy

Written by
Date: 2009-05-07 10:36:30 00:00


If you need to install or update an Arch Linux package and you are behing a proxy, there is a way to quickly configure it to use that proxy.

This will not be permanent, so it is great to use with Laptops, to set a momentary proxy server.

To set the http proxy enter in the console

su -

To switch to root, as root is the user that is able to run pacman

export http_proxy='http://127.0.0.1:8123'

To set the ftp proxy enter in the same console window

export ftp_proxy='http://127.0.0.1:8123'

be sure to use the appropriate IP and port according to your environment.

Edit 09/18/09

Thanks to the comment below, I have noticed that this was missing, here is the answer to that comment:

export http_proxy='http://username:password@127.0.0.1:3128'

export ftp_proxy='http://username:password@127.0.0.1:3128'

Enter the correct username, password, IP and port.