11

There is no 'Apply System Wide' option.I have to manually change /etc/apt/apt.conf file every time I set or unset proxy.

How do I configure it so that it applies system wide proxy settings - with apt.conf updating accordingly in Ubuntu 18.04?

EDIT:

Despite setting apt.conf manually, I'm not able to install anything through Ubuntu Software because an "Unsupported proxy configured: proxy.server.com//8080" error comes up. How do I fix this?

2

3 Answers 3

8

Set proxy details in Environment variables;
Edit /etc/environment and add following lines (replace username, password, host and port with your proxy details).

http_proxy=http://username:password@host:port/
ftp_proxy=ftp://username:password@host:port/
https_proxy=https://username:password@host:port/ 

For apt,software center & etc;
edit /etc/apt/apt.conf.d/80proxy (if its not exist create it) and add the following lines

Acquire::http::proxy "http://username:password@host:port/";
Acquire::ftp::proxy "ftp://username:password@host:port/";
Acquire::https::proxy "https://username:password@host:port/";
9
  • 1
    Is there anyway to automatically update /etc/apt/apt.conf.d/80proxy? I have to manually set it each time - in previous versions of Ubuntu, I needn't have done that - just clicking on the button 'Apply System Wide' through GUI was good enough.
    – Trial
    Jun 25, 2018 at 5:44
  • what is the Desktop Environment you use? Gnome? Jun 25, 2018 at 5:45
  • check this for Gnome. but everytime you setting proxy you will need to type them in. link Jun 25, 2018 at 5:49
  • :) if you found answer mark it. Jun 25, 2018 at 5:54
  • Despite setting apt.conf manually, I'm not able to install anything through Ubuntu Software because an "Unsupported proxy configured: proxy.server.com//8080" error comes up. How do I fix this?
    – Trial
    Jun 25, 2018 at 11:39
1

I didn't find any proxy information in /etc/environment even on /etc/apt/apt.conf.d/80proxy, because I informed proxy value at setup.

I find it on this file: /etc/apt/apt.conf.d/90curtin-aptproxy.

0

18.04 uses GNOME as the default desktop manager, although I prefer Unity which was used in several previous LTS releases. When I installed and switched to Unity, the "apply system wide" option was restored in the network/proxy settings menu.

To switch to Unity, run sudo apt update && sudo apt install ubuntu-unity-desktop, and select the lightdm option when prompted. I had to first edit /etc/environment by hand to include my proxy server before apt could reach the repositories for the update/install. This link gives a detailed description of how to switch to Unity.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .