A junior administrator ran systemctl disable bluetooth.service to keep the Bluetooth stack from loading at boot, yet the service still becomes active when a user logs in and requests Bluetooth. The security team now requires Bluetooth support to remain completely inactive until further notice-no user or dependency should be able to start it, either automatically or manually-while still allowing an easy rollback of the change at a later date. Which single systemctl command meets this requirement?
The systemctl mask sub-command replaces the unit file with a symbolic link to /dev/null. Because the file effectively disappears, systemd refuses all attempts to start the unit-whether at boot, by another unit's dependency, or by an explicit systemctl start. The service remains stopped until it is deliberately unmasked.
systemctl mask bluetooth.service enforces the complete block that the security team wants.
systemctl stop only ends the current instance; the service can be started again at any time.
systemctl disable --now stops the service and prevents it from starting at boot, but dependencies or a manual start can still activate it.
systemctl preset applies whatever the distribution's default preset file specifies and is not intended to enforce a hard block.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between disabling and masking a service in systemd?
Open an interactive chat with Bash
How does masking a service with systemctl work under the hood?
Open an interactive chat with Bash
When should you use masking instead of stopping a service?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access