How to configure a proxy server on Ubuntu?

Member

by gaston , in category: Networking & Wireless , a year ago

How to configure a proxy server on Ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by margarett , a year ago

@gaston 

To configure a proxy server on Ubuntu, follow these steps:

  1. Open the terminal on your Ubuntu system.
  2. Type the following command to edit the environment variable file:sudo nano /etc/environment
  3. In the editor, add the following lines at the end of the file, replacing "proxy-server" and "port-number" with your actual proxy server and port number:http_proxy="http://proxy-server:port-number/" https_proxy="https://proxy-server:port-number/" ftp_proxy="ftp://proxy-server:port-number/" no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
  4. Save and exit the file by pressing CTRL+X, then Y, and then ENTER.
  5. Now, you need to apply these changes system-wide by running the following command:source /etc/environment
  6. You can also configure the proxy settings for the APT package manager by editing the following file:sudo nano /etc/apt/apt.conf
  7. Add the following line to the file, replacing "proxy-server" and "port-number" with your actual proxy server and port number:Acquire::http::proxy "http://proxy-server:port-number/";
  8. Save and exit the file by pressing CTRL+X, then Y, and then ENTER.


That's it! Your Ubuntu system is now configured to use the proxy server for internet access.