Recover services that have been prevented from starting by systemd masking and get them running again. 30.01.2026 | reading time: 3 min Services can be masked to intentionally block their startup; this short guide shows how to detect a masked unit, remove the mask and restore the service with concrete commands. A masked service in action See a real scenario where a service is made unstartable and how the system reports it; run the following to observe status, mask a unit and inspect the filesystem: ```bash # check status before $ sudo systemctl status webapp.service ● webapp.service - Example Web Application Loaded: loaded (/etc/systemd/system/webapp.service; enabled) Active: active (running) since Tue 2026-01-20 10:00:00 UTC; 2h 3min ago # mask the service $ sudo systemctl mask webapp.service Created symlink /etc/systemd/system/webapp.service -> /dev/null # status after masking $ sudo systemctl status webapp.service Unit webapp.service is masked. # file system shows the symlink $ ls -l /etc/systemd/system/webapp.service lrwxrwxrwx 1 root root 9 Jan 20 12:05 /etc/systemd/system/webapp.service -> /dev/null ``` Unmask and bring back Tell the system to remove the deliberate block and start the unit again with these commands and check the result: ```bash $ sudo systemctl unmask webapp.service Removed /etc/systemd/system/webapp.service. $ sudo systemctl daemon-reload $ sudo systemctl start webapp.service $ sudo systemctl status webapp.service ● webapp.service - Example Web Application Loaded: loaded (/etc/systemd/system/webapp.service; enabled) Active: active (running) since Tue 2026-01-20 12:07:00 UTC; 5s ago ``` Edge cases worth knowing Masking creates a symlink to /dev/null but units can still be prevented by drop-ins, presets or distribution-level masks in /lib/systemd/system; use `systemctl list-unit-files | grep masked` to find masked units, check `readlink` on the unit file to confirm the /dev/null link, and remember `systemctl mask --now` also stops a running unit while masking it. Helpful companions When you unmask a unit you often need logs and overrides: inspect runtime logs with journalctl, create safe overrides with systemctl edit, and validate boot ordering with systemd-analyze to ensure the service starts as intended. Final note Masking is a powerful administrative tool to safeguard a host from unwanted services; unmasking is simple but always verify why a unit was masked in the first place before re-enabling it, and consider logging and dependency checks as part of your recovery workflow; expand your skills further with dedicated Linux certification training such as CompTIA Linux+ or LPIC-1 and intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. boot-process troubleshooting utilities processes security