Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm new to linux so I have no clue how to do this (couldn't find it on the web). I'm running a LAMP Virtual Machine and when I press ALT-F2, F3 etc.. to use a Virtual Console I get a blank screen (all black to be exact) not a login option, so the question is how can I enable multiple consoles for my system?

The linux I'm running is this LAMP Virtual Appliances, Linux lamp 2.6.24-18-virtual (It says Ubuntu but I don't know the version).

I don't know if this helps but I can connect by SSH from the host computer.

Thank you, Rodrigo.

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

I am not familiar with that virtual appliance but given the kernel version, it seems like it is based on a 8.04 version of Ubuntu. It is probably using upstart. So you probably need to create files in /etc/event.d for each virtual console you want. You probably already have a file /etc/event.d/tty1 that you could copy to /etc/event.d/tty[2-6]. You'll need tweak the exec line for each file.

Of course you could also simply use GNU Screen and get a similar effect with additional features like being able to disconnect and then reconnect remotely.

share|improve this answer
    
Thank you, everything was as you said, now works perfectly. –  rodrigoq Mar 6 '10 at 4:00
add comment

I was having the same problem today, though instead of black screen when pressing alt+f2..12 it simply did nothing. I found the solution/answer on Wikipedia.

screen was not installed, so this was no option. I could however use the following command:

    openvt

Then to switch to the newly created Virtual Terminal, I could simply press alt+f2. Another openvt enabled alt+f3, etc. In case the alt+f1..12 keys doesn't work, use chvt n, where n is the virtual terminal you want to switch to (example: chvt 1). Using an invalid number, for example 3 when allocating only 2, gave a black screen for me. To switch back I could use alt+f1.

If you want to disallocate a virtual terminal, use deallocvt n, where n is the virtual terminal to disallocate. For some reason this always gives me "Device or resource busy" though.

Source: http://en.wikipedia.org/wiki/Virtual_console

share|improve this answer
add comment

The others have answered how to enable multiple TTYs. Just one more option: you can use screen to have multiple logins and switch between them, even if you have only one tty.

share|improve this answer
add comment

See man inittab (or /etc/inittab). You want to ensure that getty is installed

apt-get install (util-linux|mingetty|ngetty|rungetty)

and ensure that the /etc/inittab file has them running for your default runlevel. E.g.:

1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
share|improve this answer
    
If the system is Ubuntu based as I suspect this does probably does not apply since init is not used. –  Zoredache Mar 5 '10 at 23:39
    
Ah, true. I didn't realize that, thank you. –  mctylr Mar 6 '10 at 22:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.