Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

At the moment I have a keyboard which lacks function keys (F1 through F12), and I was wondering - is there a way I could switch to textual TTYs (and back, which might prove to be a problem if I were to use xmodmap)?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Assuming Linux, you can use chvt (as in sudo chvt N) to switch virtual terminal, where N is the number corresponding to the VT to activate. For example, sudo chvt 1 for the first VT, and sudo chvt 7 for the VT where you will most often find X running.

Note that chvt requires root privileges to do its thing, hence the sudo is necessary unless you are already logged in as root.

On Debian, chvt is provided by the packages kbd and console-tools; mine is the one from console-tools. Other distributions are likely similar.

By the way, this took me about 15 seconds to find by typing linux remap virtual terminal switch into Google. :-) I was expecting to find something to actually remap the switch to another key combination, but chvt answers your question just as well.

share|improve this answer

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.