Copy and paste to terminal:
if command -v pacman &> /dev/null; then
sudo pacman -Syu --noconfirm cups cups-browsed avahi hplip gutenprint foomatic-db-engine \
&& sudo systemctl enable --now cups cups-browsed avahi-daemon
elif command -v apt &> /dev/null; then
sudo apt update \
&& sudo apt install -y cups cups-browsed avahi-daemon hplip printer-driver-gutenprint \
&& sudo systemctl enable --now cups cups-browsed avahi-daemon
else
echo "Unsupported Linux distro — install CUPS, Avahi, and drivers manually"
fi