Linux Classes
Share This With a Friend  
LINUX CLASSES - LINUX BASICS

What is a Linux Virtual Console?

What Virtual Consoles Are Good For

Remember that bit about multiple log-ins? Even though you may not have more than one physical console (a monitor plus a keyboard) connected to your PC, you can use virtual consoles to log in simultaneously to more than one account on your system. You can use virtual consoles to perform two activities in parallel. For example, I used one virtual console to write this section and another to test the commands as they were introduced. You can even use your mouse to cut and paste text from one virtual console to another. When you start your Linux system and get the log-in prompt, you're looking at console number 1. Go ahead and log in as root here; then press alt-F2. You should then see another log-in prompt. You can log in as user hermie on this console and then press alt-F3 to access a third console or press alt-F1 to return to the first console.

Virtual consoles come in particularly handy if you have a long-running task to perform, like installing a big software package from a CD-ROM--you can pop over to another console and log in again to stay productive while your CD-ROM churns away.

Note: You don't have to use a different user account for each console. Linux lets you log in to an account multiple times simultaneously.

By default, your Linux system already has a bunch of virtual consoles waiting in the wings when you start your system, and pressing alt-Fn at any time will bring the nth one up on your screen. You can also cycle through the consoles with alt-left arrow or alt-right arrow.

Multitasking under Linux isn't really much different from having multiple windows active on a Windows or Macintosh system. The major difference is that if you've started multiple consoles, you can see only one at a time on the screen, though the others are still working away behind the scenes.

Previous Lesson: Root and Other Users
Next Lesson: Logoff and Shutdown

[ RETURN TO INDEX ]


   

Comments - most recent first
(Please feel free to answer questions posted by others!)

Nike Jerseys     (13 Aug 2013, 14:51)
|

Welcome NFL Official Store,we hava any team jerseys and any players
jerseys of NFL.Now Discount is coming. New NFL Season,New NFL jerseys.
Gerald     (27 May 2013, 19:00)
How do you download and install a Linux ISO to be used on Windows Virtual Pc 2007?
aneesh     (14 Jan 2013, 11:35)
hey , how can do this (increase terminal) in linux 6.
nadji     (31 Dec 2012, 16:00)
i can't understand the differenence between
virtual console and virtual terminal
Matt Gilbert     (01 Apr 2012, 18:17)
re: Leswika@SA (16 Feb 2011, 05:15)
is there a site where i can practice Linux online

Actually, you can telnet to sdf.lonestar.org and get a free shell account, by taking your time, and READING the help files and tutorials you are presented with along the way, it will give you a real feel of the 'unix' world.

Like anything else, you get out of it what you put into it.
Matt Gilbert     (01 Apr 2012, 18:03)
Distro's like Ubuntu, while they may be popular do a great disservice (IMHO) by obfuscating the whole root account they impose on new users by hiding root, in a manner of speaking, and giving only the su or sudo options- another topic within itself.......

If I could suggest something, to really LEARN the command line interface in linux, use a distro that will let you boot directly to the CLI at terminal 1 (tty1) and will let you log in as root, as Bob is trying to show you here - and you will appreciate and experience the awesom power of having 6 terminals - true multiuser and multitasking!.

Slackware and slack based distros stay very close to this classic unix approach, and a really good way to get started would be with a slack based live CD, and boot to 'text mode', (CLI) There, you can learn these basics Bob is setting forth, AND you can do so as root without fear of causing any damage, as when you are using a Live CD the file system will be running entirely in memory anyway - even if you screw something up, no harm no foul as the whole system is gone anyway when you reboot. Live CD's that come to mind that are slack based that are very good are slax, NimbleX, Wolvix, Zenwalk, and Vector Linux. Download the .iso's and burn the CD and boot the CD. Some even have installers if you wish to install. Also, earlier versions of slackware itself, I think up to version 9.1 have a live CD included with the distro. You don't need a bleeding edge whiz bang flashy distro to learn the basics.
praveen     (31 Mar 2012, 22:32)
Sir,
The symbol $ represents that he is an user
whereas # represents the super user

Am I correct?
Seth     (17 Nov 2011, 16:15)
@Wayne

I'm guessing you have the answer by now, but if others experience this issue... Ubuntu's root user is disabled by default, you cannot log in as root.

If you wish to use the root account, you must manually set a password by opening a shell and typing passwd root and setting the password.
Once a password is set, you can begin using the account, however you should really read ubuntu's justification for disabling the root user in the first place before deciding if you want to go that route.
Ben     (21 Oct 2011, 08:05)
chintan you may find a solution embedded in the following command.

$man visudo

This should explain more about the sudo file. You will especially need to pay attention to how to limit user access to root in the sudo file.

USERS sudo PASSWORD

You can establish that anyone in the USERS group needs to input a PASSWORD prior to using sudo. This is helpful because of utilities like fam, acct which track and log goings on in the computer. As root you could set up a simple script to alert you of users attempting to hijack you. In fact, you could also set up the script to deny them further access, direct them to a honey pot or jail. If this all sounds kooky, try using Google a bit and you'll find out more. HTH.
suniti mukherjee     (17 Aug 2011, 04:54)
where do i find the Redhat Enterprise Linux version 6 video tutorial over internet?its urgent pls
suniti mukherjee     (17 Aug 2011, 04:53)
please tell me how to increase the number of virtual consoles in Redhat Linux system?
tvicky     (19 Jul 2011, 09:04)
Hello Bob, I was wondering if you would have a hint for my problem.
I've ucLinux running on my board. After it boots my shell script are starting automatically in background with logged output. Is it actually possible to redirect its input and output streams to the telnet console, which can be create some time later?
I hope you understand what I mean.
Thank you in advance!
Bob Rankin     (04 May 2011, 07:12)
@Ram - Try WUBI.
Ram     (04 May 2011, 01:57)
Hi Bob,
i am newbie to linux, can u please let me know how to install linux on windows 7 as other operating system?

Regards
Ram
Wayne     (02 May 2011, 12:42)
Thanks for the quick reply Bob. Problem is it didn't work. When the login box comes up I click other and type root for user name, hit enter and the box for password comes up but the user name still says other and pressing enter with the password box empty still gets me Authentication Failure.
Bob Rankin     (02 May 2011, 12:19)
@Wayne - just press ENTER. If there is no root paswword, that should work.
Wayne     (02 May 2011, 12:06)
Hi Doc,
Love your newsletter and am enjoying this tutorial but I have a problem. When I installed Ubuntu on my Windows machine I set a password for my user name but not for ROOT. Now when I try to log on as ROOT I get authentication failed. I only set the one password and it doesn't work.
tony     (07 Apr 2011, 20:58)
To answer tb01:
If you log in only to the shell, it IS true, but, if you log into a GUI (graphical user interface, such as gnome, openbox, kde, etc.), you can open terminals in a terminal emulator program, as many as you like, some with tabs (like a browser), but, alt+F# keybinding are likely to be assigned to other functions (for instance, alt+f2 opens a command prompt in many guis, like the "run command" thingy in windows).
guus     (11 Mar 2011, 06:13)
@Leswika - Every spammer would like that. But if you want to try, download a live cd (e.g. Ubuntu), burn it and try it out without installing anything.
Leswika@SA     (16 Feb 2011, 05:15)
is there a site where i can practice Linux online
Bob Rankin     (21 Jan 2011, 11:25)
@tb01 - See the comment by AmbDawn below.
tb01     (20 Jan 2011, 09:04)
...quote "By default, your Linux system already has a bunch of virtual consoles waiting in the wings when you start your system, and pressing alt-Fn at any time will bring the nth one up on your screen. You can also cycle through the consoles with [em]alt-left arrow or alt-right arrow[/em]."

Hey Bob, is this still correct in 2011? Same as 'back' and 'forward' in browsers? If so, is this function limited to terminal logins w/o an X-window manager? Just want to clarify... Thanks in advance!

Thank you also for this wonderful resource! Finally, a place I can refer non-geeks for info on Linux!
chintan     (08 Jan 2011, 17:51)
hi,

Firstly, I am really thankfull for the tutorials you provide us.
I had a question, you say log in as root but I read somewhere that for ubuntu the root is locked permanently and if you want to have privileges of a root you just have to add sudo in front of the command.
now here is my issue

So in a ubuntu terminal I changed the root pw:

$ sudo passwd

So now I have a changed root pw, but when I do a:

$ su

I am prompted for a password, but when I do a:

$ sudo su

I gain access to root privileges without being prompted for a password. My concern here is that if someone pawns my machine (through my non-root user account) wouldn't they also be able to sudu su to root privileges without entering a password?
mohmmad Samiullah Mir     (12 Dec 2010, 23:52)
much knowkedge on relevent topic reeally good work and efferts
AmbDawn     (12 Dec 2010, 13:13)
@zedadex - in Ubuntu you need to use the combination ctrl+Alt+<F1-F6>. To return to GUI use ctrl+Alt+F7. Hope it helps.
zedadex     (18 Nov 2010, 15:40)
umm... my alt+function keys don't bring up any alternate virtual console log-in screens or anything. Do you have to press alt+f2 while logging in or something?
Bob Rankin     (14 Oct 2010, 13:43)
@Ron - Send me an Audi TT Coupe, and I'll get right on that for ya...
Ron     (11 Oct 2010, 13:29)
Please send me full Linux training with screen shots.........JJ....luv your site

I welcome your comments. However... I am puzzled by many people who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn all you can, ask questions if you like. But don't ask me to send what you already have. :-)

NO SPAM! If you post garbage, it will be deleted, and you will be banned.
*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text:
 
 


Ask Bob Rankin - Free Tech Support


Copyright © by - Privacy Policy
All rights reserved - Redistribution is allowed only with permission.