Tuesday, March 20, 2012

Setting up apt-get to use a http-proxy

This is a temporary method that you can manually use each time you want to use apt-get through a http-proxy. This method is useful if you only want to temporarily use a http-proxy. 

Enter this line in the terminal prior to using apt-get (substitute your details for yourproxyaddress and proxyport).
 
export http_proxy=http://yourproxyaddress:proxyport
 
 
Done!!! 
 
 
Option 2:
 
Type in Terminal

gedit /etc/apt/apt.conf


(root authentication is required)

Now type this two lines in the text file:

Acquire::http::Proxy "http://username:password@proxyaddress:port";
Acquire::ftp::Proxy "ftp://username:password@proxyproxyaddress:port";

Save and Done!

Try this in terminal now, 

sudo apt-get update


You will see your ubuntu getting updated!
 

2 comments:

  1. Hey! I just wanted to ask if you ever have any issues with hackers?
    My last blog (wordpress) was hacked and I ended
    up losing several weeks of hard work due to no backup. Do you have any methods to protect against hackers?
    Also see my web page > websites

    ReplyDelete
    Replies
    1. Keep your password changing every three months and you are good to go! :-)

      Delete