In this article, we’re going to explore how to disable the blank console screensaver on an Ubuntu Server. This is a common requirement for server administrators who want to keep their console screen active at all times.
To disable the blank console screensaver on Ubuntu Server, you have two methods. Method 1 involves editing the GRUB bootloader configuration by adding "consoleblank=0" to the "GRUB_CMDLINE_LINUX_DEFAULT" line in the /etc/default/grub file. Method 2 uses the "setterm" command to disable screen blanking temporarily and make it permanent by adding the command to the ~/.bashrc file. Remember to reboot your server after making these changes for them to take effect.
Understanding Console Screensaver
The console screensaver is a power-saving feature that blanks the screen after a period of inactivity. While this is useful for desktop environments, it can be an inconvenience on a server where constant visibility of the console screen may be required.
Method 1: Editing the GRUB Configuration
The first method involves editing the GRUB bootloader configuration.
Step 1: Open the GRUB Configuration File
Open your terminal and type the following command:
sudo nano /etc/default/grub
This command uses
sudo to run the
nano text editor with root privileges, allowing you to edit the
Step 2: Edit the Configuration
In the file, find the line that starts with
GRUB_CMDLINE_LINUX_DEFAULT=. This line contains the default parameters for the GRUB bootloader. Add
consoleblank=0 to this line, making sure to separate it from any existing parameters with a space. The
consoleblank=0 parameter disables the console screensaver.
For example, if the line originally read
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash", it should now read
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash consoleblank=0".
Step 3: Update GRUB and Reboot
Save the file and exit the text editor. In the terminal, run the following command to update GRUB with your new configuration:
Finally, reboot your server to apply the changes.
Method 2: Using the
setterm command allows you to change terminal settings. In this case, we’ll use it to disable the console screensaver.
Step 1: Run the
In your terminal, type the following command:
setterm -blank 0
-blank 0 parameter tells
setterm to disable screen blanking.
Step 2: Make the Change Permanent
To make this change permanent, add the
setterm command to your
~/.bashrc file. This file runs each time you open a new terminal session, ensuring that the console screensaver remains disabled.
~/.bashrc with a text editor:
At the end of the file, add the
setterm command, then save and close the file.
Disabling the console screensaver on your Ubuntu Server is a straightforward process. Whether you choose to edit the GRUB configuration or use the
setterm command, you’ll be able to keep your console screen active at all times. Remember to reboot your server after making these changes to ensure they take effect.
Server administrators may want to disable the console screensaver to ensure constant visibility of the console screen, especially in situations where remote access is not available or practical.
Disabling the console screensaver will prevent the screen from blanking after a period of inactivity, which may slightly increase power consumption. However, the impact on power consumption is typically minimal and should not be a significant concern for server administrators.
Yes, you can re-enable the console screensaver by removing the changes made to the GRUB configuration or by modifying the
setterm command in your
~/.bashrc file. Simply revert the changes and reboot the server to apply the new configuration.
Disabling the console screensaver itself does not directly affect the security of your Ubuntu Server. However, it is important to ensure that other security measures, such as strong passwords, firewall configurations, and regular software updates, are in place to maintain the security of your server.
The methods described in this article are specific to Ubuntu Server. However, other Linux distributions may have similar options to disable the console screensaver. It is recommended to consult the documentation or support resources specific to your distribution for guidance on how to disable the console screensaver.