Use the terminal to set the network proxy in Ubuntu11.10

Source: Internet
Author: User
In Ubuntu, set the network proxy through the terminal so that apt-get and other commands can be used normally. You only need to set the http_proxy system variable in the terminal: [plain] exporthttp_proxy = http: // usr_name: usr_password @ ipaddress: portusr_name: username usr_password: User Password ipaddres

In Ubuntu, set the network proxy through the terminal so that apt-get and other commands can be used normally. You only need to set the http_proxy system variable in the terminal:

[Plain]
  1. Export http_proxy = http: // usr_name: usr_password @ ipaddress: port
Usr_name: User Name
Usr_password: User Password
Ipaddress: Proxy Server IP Address
Port: proxy server port number

In this way, the agent only takes effect temporarily and becomes invalid after the system is restarted. To set a global proxy to access the Internet, run the following statement:

[Plain]
  1. Gedit ~ /. Bashrc
Add the following content at the end of the. bashrc file:

[Plain]
  1. Export http_proxy = http: // proxyaddress: port
Proxyaddress: proxy IP Address
Port: port Number

Save the file, re-open the terminal, apt-get and other commands can be used normally, and use it in Ubuntu 11.10.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.