On ubuntu server, how can I avoid the screen being cleared just before the login screen pops?
I'm trying to read an error message on one of the services and I get this annoying clear screen and I cannot scroll up with shift-pageUp.
Viewing the last screen of messages that appeared during boot
When Ubuntu Server boots, the messages you see are typically written to tty7 (the seventh virtual console). When booting completes, you are switched to tty1, where you are prompted to log on. Thus, the boot messages are not actually cleared; you are simply switched to a different console from the one that contains them.
To view them again, you can switch to tty7 by pressing Alt+F7. You can switch back to tty1 with Alt+F1 (and to the second with Alt+F2, and so forth). This does not (and should not) apply on most Ubuntu Server systems, but when a GUI is running, Ctrl+Alt+F1 must be used to switch to tty1 (and Ctrl+Alt+F2 for tty2, and so forth).
Preventing the screen from being cleared after a user logs out, so the text from their session is visible in the subsequent session
In your home directory there is a file called .bash_logout which contains something like:
That is what causes the screen to be cleared on logout. To stop that from happening, comment out all those lines, so it looks like:
This forces the kernel log to be printed on
Then just go into
you'll have to replace:
That's all, run