Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to use PuTTY to change the virtual console on Linux via the usual key commands - Alt + F1 or Ctrl + Alt + F1 etc. However this doesn't work.

Switching TTY should be simple and is something I need to be able to do in PuTTY, preferably not via chvt but preferably with keypresses like the above.

Any ideas how I can do this?

share|improve this question
    
Are you trying to switch VCs for the physically attached display or for your PuTTY connection? Also, what is wrong with chvt? –  grawity Jul 16 '11 at 13:32
    
For PuTTY, and what I'm specifically looking to do is to be able to be in some program like vim or mutt, then switch to another tty. I've tried this using sudo chvt (and checking with fgconsole), and it doesn't seem to work, and I'd just like to know how to switch using functions key anyhow! –  nemof Jul 16 '11 at 16:20
add comment

1 Answer

up vote 6 down vote accepted

There are no virtual consoles over an SSH connection, you just get the one terminal per connection. It sounds like screen may do what you're looking for, though:

Screen is best described as a terminal multiplexer. Using it, you can run any number of console-based applications--interactive command shells, curses-based applications, text editors, etc.--within a single terminal. The desire to do this is what gets most people hooked on screen. I used to start a half-dozen terminal emulators when I logged into my machine: I wanted one to read my email, one to edit my code, one to compile my code, one for my newsreader, one for a shell into my web host, and so on. Now I start one terminal emulator, and run screen in it. Problem solved.

The other main cool feature of screen is its ability to decouple the terminal emulator from the running programs. This means that you can use screen to keep programs running after you accidentally close the terminal emulator, or even after you log out, and later resume right where you were. It means that the idea of a "session" in which you are running a number of console programs is a free-floating entity that you can bind to any terminal anywhere, or no terminal at all if you want.

share|improve this answer
2  
Don't forget tmux. –  grawity Jul 16 '11 at 16:39
    
Ah perfect, this was exactly what I wanted to know. –  nemof Jul 16 '11 at 16:54
    
Just came back to say, testing tmux and it's an excellent program, specially being able to split panes so easily. –  nemof Jul 16 '11 at 17:54
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.