Disable screen going blank ubuntu server / Network timeout

  • by

Using setterm command.

man setterm  : writes to standard output a character string that will invoke the specified terminal capabilities. Where possible terminfo is conâ sulted to find the string to use. Some options however (marked “virtual consoles only” below) do not correspond to a terminfo(5) capability. In this case, if the terminal type is “con” or “linux” the string that invokes the specified capabilities on the PC Minix virtual console driver is output. Options that are not implemented by the terminal are ignored

$ setterm -powersave off -blank 0

If it dumps back you with an error that read as follows:
cannot (un)set powersave mode

You need to shutdown X window system and rerun the above command. Better, add following two commands to your ~/.xinitrc file or /etc/rc.local

setterm -blank 0 -powersave off -powerdown 0
xset s off