Monday 28 January 2013

Linux : set proxy for whole OS apt.conf

Method 1:
Step 1 : run this command on the terminal

linus@UbuntuLinux$ sudo gedit /etc/apt/apt.conf
//// press enter and then enter password, then gedit will open

Step 2 : write this code into the open gedit file : apt.conf

Acquire::http::proxy "http://username:password@ipaddress:port";
Acquire::https::proxy "https://username:password@ipaddress:port";
Acquire::ftp::proxy "ftp://username:password@ipaddress:port";
Acquire::socks::proxy "socks://username:password@ipaddress:port";



Step 3 : Save the file, close the gedit and type exit on the terminal and it's done.

Method 2 :

Step 1 : write this commands on the terminal
linus@UbuntuLinux$ sudo cat > /etc/apt/apt.conf
Enter password for linus :                      ////enter password 

Acquire::http::proxy "http://username:password@ipaddress:port";
Acquire::https::proxy "https://username:password@ipaddress:port";
Acquire::ftp::proxy "ftp://username:password@ipaddress:port";
Acquire::socks::proxy "socks://username:password@ipaddress:port";

///// then press control +  c   (i.e. ^+c) 
linus@UbuntuLinux$ exit

And it's done.



No comments:

Post a Comment