The following two files are virtual files:


I know that /dev/sda1 is a device file (that points to a device driver), so when I access this file, I am actually accessing the device driver.

But what about /proc/cpuinfo, is this file also a device file? If it is, are all other virtual files in Linux device files?

2 Answers 2


All the files in /proc are provided by the proc file system, which is described thus in its manpage:

The proc filesystem is a pseudo-filesystem which provides an interface to kernel data structures.

This is a special file system provided by the kernel to provide access to the data it stores, e.g. about the CPU (cpuinfo), about processes (in the numeric directories in /proc, corresponding to each process identifier)... The files inside it aren’t device files, they are effectively endpoints for function calls into the kernel to retrieve information from it.

Other special file systems include devtmpfs and sysfs.

So no, all “virtual” files aren’t device files. Arguably, device files aren’t virtual at all, since device nodes exist as real files; the way they act is not the same as what most people think of as files, but they are files nevertheless.

These questions might help you understand all this better:


No. /proc on Linux is a pseudo-filesystem which provides an interface to kernel data structures. There are no character or block special files in it in the same sense as the files under /dev (you can't use the /proc files for mounting a filesystem or talk to a modem or tape drive etc).

This filesystem is fully explained by the proc(5) manual on your system (man 5 proc).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .