System Administration
Showing results for 
Search instead for 
Did you mean: 

why show tty login prompt before runlevel 5 login?

Go to solution
Regular Advisor

why show tty login prompt before runlevel 5 login?

Hi All,

I am using RHEL5 and I am screwed about below-
1)why it shows tty login prompt before graphical login screen?
2)when I put date command like
# date 12202007
why command line jumped three line down?

Thanks in Advanced!
Honored Contributor

Re: why show tty login prompt before runlevel 5 login?

Just like most Linux distributions, RedHat uses Linux virtual console system. The console display is actually split to multiple "virtual consoles". Only one virtual console is active at one time. This feature is not new: it was present in Linux distributions in year 1996.

You can switch from one virtual console to another by pressing Ctrl-Alt-Fx key combinations on the console keyboard: Ctrl-Alt-F1 for the first virtual console, Ctrl-Alt-F2 for the second and so on.

Another possibility is to use the "chvt" command to change the active virtual console. This is usually used in scripts only.

There is a standard convention of virtual console use: the first five or so consoles contain a tty login prompt. When the graphical login screen activates, it automatically switches to virtual console 7.

The tty login prompts and the graphical login screen are both started at the end of the system start-up. The tty login prompt is created by a process called "getty", which is very small and starts very fast. The graphical login screen is produced by the X Window System, which is very complex.

It's possible that the tty login process of virtual console 1 can complete its start-up before the X Window System startup reaches the point where it switches to virtual console 7 and takes control of the display. This will cause what you saw.

The virtual console switching can be very useful if your graphical session hangs: you can switch to tty login and use it to kill a misbehaving process or your entire graphical login session, so you don't need to reboot the entire system.
It's possible to disable the virtual console switching, but usually it is not needed: the console of a critical server should always be placed in a secure location. Virtual consoles won't change that requirement.

Not enough information to find out why. But it does not seem to be very harmful.

Did you have a background job running? It might have output some blank lines.

Or did you recently change the size of your terminal window? In some situations, the shell may not receive the information that the window has shrunk. If a command then displays one (long) blank line, it may be automatically wrapped to several (short) lines.

Alexander Chuzhoy
Honored Contributor

Re: why show tty login prompt before runlevel 5 login?

Sometimes we just forget that we aliased a command, so you better check the output of:
`alias date`
dirk dierickx
Honored Contributor

Re: why show tty login prompt before runlevel 5 login?

i think vt switching was available since the first release of linux.