Accessing the Linux Virtual Console from X

I wanted to copy some text from my Virtual Console (Ctrl + Alt +F[1-6]).
Each of the Virtual Console have a corresponding /dev/vcs[1-6] file.

So doing a cat /dev/vcs2 you get the screen dump of Virtual Console 2.
Note that the output does not contain newline characters, so not properly formatted.

Now the /dev/ttyX files can be used to output text to the corresponding virtual console.

[root@localhost ~]# echo "what is the use of this?" > /dev/tty3

This will print ‘what is the use of this?’ to the virtual console 3

Leave a Reply

Your email address will not be published. Required fields are marked *

five + = 11

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>