Home > Linux, Ubuntu > Proxy support for apt-get package management

Proxy support for apt-get package management

Define the http_proxy variable in the format http://host:port/. If you have to login then use the format http://username:password@host:port/. To define this variable add the following lines to the root login file /root/.bashrc.

http_proxy=http://username:password@host:port/
export http_proxy

To use the proxy only user specific define the variables in the file ~/.bash_profile or ~/.profile. If the file ~/.bash_profile exists the file ~/.profile will ignored by the Bash (Standard-Shell). The settings in ~/.bashrc overwrite ~/.profile, too.

To use changes of the file ~/.profile without a restart you can use the following command:

source ~/.profile
Advertisements
Categories: Linux, Ubuntu
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: