vcs, vcsa - virtual console memory


   /dev/vcs0 is a character device with major number 7 and minor number 0,
   usually of mode 0644 and owner root.tty.  It refers to  the  memory  of
   the currently displayed virtual console terminal.

   /dev/vcs[1-63]  are  character  devices  for virtual console terminals,
   they have major number 7 and minor number 1 to 63,  usually  mode  0644
   and  owner  root.tty.  /dev/vcsa[0-63] are the same, but using unsigned
   shorts (in host byte order) that include attributes, and prefixed  with
   four  bytes  giving  the  screen dimensions and cursor position: lines,
   columns, x, y.  (x = y = 0 at the top left corner of the screen.)

   When a 512-character font is  loaded,  the  9th  bit  position  can  be
   fetched  by applying the ioctl(2) VT_GETHIFONTMASK operation (available
   in Linux kernels 2.6.18 and above)  on  /dev/tty[1-63];  the  value  is
   returned  in  the  unsigned  short  pointed  to  by  the third ioctl(2)

   These  devices  replace   the   screendump   ioctl(2)   operations   of
   console_ioctl(4),  so the system administrator can control access using
   filesystem permissions.

   The devices for the first eight virtual consoles may be created by:

       for x in 0 1 2 3 4 5 6 7 8; do
           mknod -m 644 /dev/vcs$x c 7 $x;
           mknod -m 644 /dev/vcsa$x c 7 $[$x+128];
       chown root:tty /dev/vcs*

   No ioctl(2) requests are supported.




   Introduced with version 1.1.92 of the Linux kernel.


   You may do a screendump on vt3 by switching to vt1 and typing

       cat /dev/vcs3 >foo

   Note that the output does  not  contain  newline  characters,  so  some
   processing may be required, like in

       fold -w 81 /dev/vcs3 | lpr

   or (horrors)

       xetterm -dump 3 -file /proc/self/fd/1

   The /dev/vcsa0 device is used for Braille support.

   This  program  displays  the  character and screen attributes under the
   cursor of the second virtual console, then changes the background color

   #include <unistd.h>
   #include <stdlib.h>
   #include <stdio.h>
   #include <fcntl.h>
   #include <sys/ioctl.h>
   #include <linux/vt.h>

       int fd;
       char *device = "/dev/vcsa2";
       char *console = "/dev/tty2";
       struct {unsigned char lines, cols, x, y;} scrn;
       unsigned short s;
       unsigned short mask;
       unsigned char ch, attrib;

       fd = open(console, O_RDWR);
       if (fd < 0) {
       if (ioctl(fd, VT_GETHIFONTMASK, &mask) < 0) {
       (void) close(fd);
       fd = open(device, O_RDWR);
       if (fd < 0) {
       (void) read(fd, &scrn, 4);
       (void) lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0);
       (void) read(fd, &s, 2);
       ch = s & 0xff;
       if (attrib & mask)
           ch |= 0x100;
       attrib = ((s & ~mask) >> 8);
       printf("ch='%c' attrib=0x%02x\n", ch, attrib);
       attrib ^= 0x10;
       (void) lseek(fd, -1, 1);
       (void) write(fd, &attrib, 1);


   console_ioctl(4), tty(4), ttyS(4), gpm(8)


   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.

Free Software

Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.

Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.

Free Books

The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.

Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.

Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.