Linux Memory Directory description

Linux memory directory

Memory directory contains files of the whole system. All the device information, process running indata or system related information are stored in this directory.

Memory directory contains the following directories.

1./dev
2./proc
3./sys

Memory directory /dev command

‘dev’ is short for device. In Linux operating system everything is a file. This is appears to be an ordinary file but doesn’t take up disk space.

The Linux all files stored in ‘/dev’ are not related to real devices, some are related to virtual devices also.

Like example of /dev command :

# ls /dev

/dev/tty and /dev/pts: ‘/dev/tty’ file represents the command line interface that is a terminal or console attached to the system. Typing commands in a terminal is a part of the graphical interface like Gnome or KDE, then terminal will be represent as ‘/dev/pts/1’ .

Here: you can 1 is replaceable by any another number.

/dev/null: /dev/null’ file is consider as black hole. It has unlimited storage but nothing can be retrieve from it.

Memory directory /proc command

‘proc’ is short for process. ‘/dev’, ‘/proc’ also doesn’t take up disk space. It contains process information.

It is a pseudo filesystem that contains information about running processes. Virtual filesystem containing text information about system resources

Linux /proc conversation with the kernel: The /proc displays view of the kernel. What the kernel manages and it is a means to directly communicate with the kernel.

Like example of /proc command :

# ls /proc

See above picture, command “ls /proc” displays content of ‘/proc‘.

‘/proc’ has some file properties like date. Which keeps on updating as shown in the below picture.

The Linux /proc are of 0 bytes yet they contain a lot of data. Most of the files are readable only, some require root privileges and some are writable.

/proc/interrupts: The ‘/proc/interrupts’ displays the interrupt.

Like example of /proc/interrupts command :

# ls /proc/interrupts

See above picture, when a system have two CPUs, files will look like this.

Memory directory /sys command

‘sys’ is short for system. Basically it contains kernel information about hardware. It was create for Linux 2.6 kernel. It is a kind of ‘/proc’ and is use for plug and play configuration.

Like example of /sys command :

# ls /sys

See your terminal after run the command. Thank you.

Leave a Reply