In Ubuntu Server, the setvtrgb.service is a systemd unit responsible for setting the color palette of the Linux virtual console (the raw TTY interface you see when not using a display manager or SSH). It reads the color configuration from /etc/vtrgb and applies it to the console. While this is a nice aesthetic touch for local administrators interacting with the server directly via a physical monitor, it is completely useless for headless servers managed entirely over SSH. Disabling it slightly streamlines the boot process and removes an unnecessary service from systemd tracking.
This guide provides a straightforward method to completely disable and mask the setvtrgb.service in Ubuntu Server, preventing it from executing during the boot sequence.
How to Disable the ‘setvtrgb.service’
To safely disable this cosmetic service, you must interact with systemctl. Follow these steps carefully with root or sudo privileges:
- Connect to your Ubuntu Server via SSH.
- First, disable the service to prevent it from starting automatically on the next system boot:
sudo systemctl disable setvtrgb.service - To completely lock down the service and ensure that it cannot be triggered by other dependencies or terminal setup scripts, you must mask it:
sudo systemctl mask setvtrgb.service
Masking links the service file to /dev/null, effectively making it impossible for systemd to start it under any circumstances.
Verifying the Changes
To confirm that the setvtrgb.service has been successfully disabled and masked, run the following verification command:
sudo systemctl status setvtrgb.service
The output should indicate that the service is masked and inactive (dead). The server will continue to function perfectly over SSH, and any local TTY consoles will simply fall back to the kernel’s default, un-themed color palette.