Alex Asked: 2012-05-19 05:03:16 +0800 CST2012-05-19 05:03:16 +0800 CST 2012-05-19 05:03:16 +0800 CST How do I disable the blank console "screensaver" on Ubuntu Server? 772 How to disable blank screensaver on Ubuntu Server? There's no desktop or X, only console (command-line interface). server command-line kernel screensaver 4 Answers Voted Best Answer ish 2012-05-19T05:14:02+08:002012-05-19T05:14:02+08:00 The easiest way is to add the parameter consoleblank=0 to your kernel command-line at boot-time. Open /etc/default/grub in your favorite editor; you will need to use sudo (for vi, nano, etc.) or gksudo (for gedit, etc.). Then add consoleblank=0 to the GRUB_CMDLINE_LINUX_DEFAULT=, parameter. e.g. yours may say: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash consoleblank=0" Then run sudo update-grub, and reboot. q9f 2013-10-12T09:47:23+08:002013-10-12T09:47:23+08:00 Type setterm -blank 0 on any shell to disable blanking out of tty consoles. 0 disables blanking, any value greater than 0 is the time in minutes. Default is 10. To permanently enable this you can add this line to your ~/.bashrc config. A more detailled explaination can be found in this answer at superuser. Questor3030 2017-09-08T21:35:55+08:002017-09-08T21:35:55+08:00 Same situation, the other suggestions seemed a roundabout solution. Came across the GNU tool setvesablank on/off using apropos. It seems the best fit, trying it out to see if it fits the need. FreeSoftwareServers 2016-09-27T11:39:44+08:002016-09-27T11:39:44+08:00 This will "overwrite" whatever is in your current config for "GRUB_CMDLINE_LINUX_DEFAULT=", mine was default, so I just use the following One Liner. sudo sed -i 's/\(^GRUB_CMDLINE_LINUX_DEFAULT=\).*/\GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"/' /etc/default/grub && sudo update-grub2
The easiest way is to add the parameter
consoleblank=0
to your kernel command-line at boot-time.Open
/etc/default/grub
in your favorite editor; you will need to usesudo
(forvi
,nano
, etc.) orgksudo
(forgedit
, etc.).Then add
consoleblank=0
to theGRUB_CMDLINE_LINUX_DEFAULT=
, parameter.e.g. yours may say:
Then run
sudo update-grub
, and reboot.Type
setterm -blank 0
on any shell to disable blanking out of tty consoles.0
disables blanking, any value greater than 0 is the time in minutes. Default is10
.To permanently enable this you can add this line to your
~/.bashrc
config.A more detailled explaination can be found in this answer at superuser.
Same situation, the other suggestions seemed a roundabout solution. Came across the GNU tool
setvesablank on/off
using apropos. It seems the best fit, trying it out to see if it fits the need.This will "overwrite" whatever is in your current config for "GRUB_CMDLINE_LINUX_DEFAULT=", mine was default, so I just use the following One Liner.