Update /etc/hosts to use auto-apt-proxy
Published: 19 March 2026
This is a short one, for me own notes. I use apt-cacher-ng to cache packages on Debian and Debian-like systems. Along with that, auto-apt-proxy on clients configured to use apt-cacher.
An easy way to get clients to use the proxy is to add an entry to the
/etc/hosts file for apt-proxy. Here's a simple one-liner for that.
echo -e "# apt-proxy\n192.168.10.120\t\tapt-proxy | sudo tee -a /etc/hosts