Basic Linux Tutorial
Computer Tutorial

Linux Memory Directories



Linux Memory Directories

/dev

The devices that are available to a Linux system. In Linux, devices are treated like files and you can read and write devices like they were files. For examples, /dev/fd0 is your first floppy drive, /dev/cdrom is your CD drive, /dev/hda is the first IDE hard drive, and so on.
All the devices that a Linux kernel can understand are located under /dev, and that’s why it contains hundreds of entries.

/proc

/proc is another special directory, appearing to be ordinary files, but not taking up disk space. It is actually a view of the kernel, or better, what the kernel manages, and is a means to interact with it directly. /proc is a proc filesystem.
» /proc/interrupts : On the x86 architecture, /proc/interrupts displays the interrupts.
» /proc/kcore : The physical memory is represented in /proc/kcore. Do not try to cat this file, instead use a debugger. The size of /proc/kcore is the same as your physical memory, plus four bytes.

/sys

The /sys directory was created for the Linux 2.6 kernel. Since 2.6, Linux uses sysfs to support usb and IEEE 1394 (FireWire) hot plug devices. See the manual pages of udev(8) (the successor of devfs) and hotplug(8) for more info (or visit http://linuxhotplug. sourceforge.net/ ).
Basically the /sys directory contains kernel information about hardware.