How to restart systemd service with wildcard

restart_systemd_service_wildcard.sh
sudo systemctl restart "gitlab-*"

will restart all systemd services starting with gitlab-. The " are only neccessary so your shell doesn’t try to interpret the wildcard.


Check out similar posts by category: Systemd