Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm doing an install via testdrive using QEMU/KVM and I would like to check the log files during the installation, however I can't figure out a way to send Ctrl-Alt-F1 and other F keys to the virtualized window (It instead goes to the TTY on the host machine).

Ctrl-Alt-1 through 4 send me to some kind of QEMU consoles (the installer is on one, then there are qemu consoles and one serial and one parallel, so I think I'm getting close.

share|improve this question
up vote 30 down vote accepted

sendkey can be used to send keys to the virtual system that your host intercepts at low level - such as Ctrl + Alt + F*.

  1. Use Ctrl + Alt + 2 to switch to the QEMU console.
  2. Type sendkey ctrl-alt-f1 and press Enter.
  3. Use Ctrl + Alt + 1 to switch back to the virtual system, which should now by at TTY1.

Once at a virtual terminal, you should be able to use the chvt command, e.g. sudo chvt 7 to go back to your X session.

share|improve this answer
+1, it works if you don't set -monitor stdio (as do aqemu GUI by default) – enzotib Jul 28 '11 at 20:00
When I do Ctrl-Alt-2 to switch to the QEMU console, I see grey-on-blue text saying "parallel0 console". None of my further keypresses seem to do anything; or if they do, they don't echo. Certainly finishing with a newline/enter has no effect at all. Am I missing something? – J-P Feb 13 '13 at 20:05

You can try using sticky keys: Press the first key three times to "stick" it to the "virtualized window" followed by the other keys e.g. CTRL+CTRL+CTRL+ALT+F1.

This should send the command to the virtual machine instead of the host machine "hijacking" it.

share|improve this answer
Could not get his working in QEMU 2 Ubuntu 14.04. Can you link to the docs? – Ciro Santilli 巴拿馬文件 六四事件 法轮功 Oct 25 '15 at 18:29

You can change tty in the guest os running on qemu with ALT + left or right arrows on the keypad.

share|improve this answer
Works on QEMU 2 Ubuntu 14.04 and The lack of upvotes for this best answer must imply it is a new feature :-) – Ciro Santilli 巴拿馬文件 六四事件 法轮功 Oct 25 '15 at 18:31
Well I am using it for quite some time now but I can't remember where/when I first read about it :) – phantomas Feb 6 at 16:51

Your Answer


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.