4

Is there a way of specifying APT proxy without needing to use a file (think apt.conf)?

tshepang
  • 64,472
  • 86
  • 223
  • 290

1 Answers1

6

Any option accepted by apt.conf can be specified on the command line with --option. An example for APT proxy, assuming apt-cacher-ng:

apt update --option Acquire::HTTP::Proxy=http://localhost:3142

Equivalent of this in /etc/apt/apt.conf:

Acquire::HTTP::Proxy "http://localhost:3142";
tshepang
  • 64,472
  • 86
  • 223
  • 290