0

man vcs(4) is Greek to me.

I'm running Lubuntu 18.04 with the LXDE graphical user interface. When searching for an answer to my other question, Where is terminal output stored?, I found that /dev/vcs1 contains the content of a terminal somewhere. I have several lxterminal windows open running bash, but /dev/vcs1 is none of these. /dev/vcs2 is the shell I see when I type Ctrl+Alt+F2. /dev/vcs and /dev/vcs[3-7] are just spaces.

  1. Where is /dev/vcs documented?
  2. Which shell is in /dev/vcs1?
  3. How can I open a shell in /dev/vcs3?
6

I think you're slightly confused here. the /dev/vcs devices each correspond to the /dev/tty devices with the same number. In essence, they're the scrollback buffers for the virtual terminals represented by the /dev/tty devices. There's very little in userspace that actually cares about or uses these device nodes, and about the only things they're used for are getting screen dumps of virtual consoles or recording the behavior of console programs.

Your terminal emulators aren't showing up in any of them because terminal emulators use pseudoterminals, not virtual consoles. More info on that can be found in man pty.

The other devices are empty because nothing is using the associated virtual consoles.

Answering your final questions:

  1. In man vcs. The documentation is exceedingly technical because these aren't something normal users need to worry about 99% of the time, and it's assumed (rightly so) that anybody who actually needs to use them is developing software to do so (and therefore has a good solid understanding of the regular terminal interfaces).
  2. The one running on your second virtual console, which you access in your case by pressing Ctrl+Alt+F2.
  3. You don't, because it doesn't make sense to do so. You can open a shell in the various /dev/tty devices by configuring your init system appropriately to do so, and the contents of the screen there will be displayed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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