Sunday, April 11, 2010

Virtual Console

Here I am talking about how we can create virtual consoles (shell screen):-
In RHEL (Red Hat Enterprise Linux) we have six virtual consoles by default we can switch to any one by pressing Ctrl+Alt+F[1-6] and back to GUI by Ctrl+Alt+F7.
If we want to create some more virtual console(we can create up to 63 virtual consoles) we can:-
Suppose we want to create virtual console no. 22 here are the steps:-
1. Open inttab file the
vim /etc/inittab 
2. Add line in 'Run gettys in standard runlevels'
"22:2345:respawn:/sbin/mingetty tty22" the same parameter we will be follows as given for other consoles.
3. Save the inittab file and exit
4. Run command "init q" to re-examine the inittab file.
5. Now If we give command "chvt 22" at prompt a new shell screen will appear. But we can't login since the user (root) is not allowed to login in the shell.
6. Open "/etc/securetty" file and add line as given "vc/22" and "tty22" in the file.
7. Save the securetty file and exit.
8. Now run the "chvt 22" at the prompt. You can login as user (root).
9. Similarly we can create more consoles. Isn't interesting.

No comments:

Post a Comment