Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

when I do ls for /dev; I get the following output

loop5               sda       tty24  tty58      ttyS4
..               loop6               sda1      tty25  tty59      ttyS5
alarm            loop7               sda2      tty26  tty6       ttyS6
ashmem           loop-control        sda3      tty27  tty60      ttyS7
autofs           mapper              sda4      tty28  tty61      ttyS8
binder           mcelog              sda5      tty29  tty62      ttyS9
block            mem                 sda6      tty3   tty63      ttyUSB0
bsg              net                 sdb       tty30  tty7       ttyUSB1
btrfs-control    network_latency     serial    tty31  tty8       ttyUSB2
bus              network_throughput  sg0       tty32  tty9       ttyUSB3
cdrom            null                sg1       tty33  ttyprintk  ttyUSB4
cdrw             oldmem              sg2       tty34  ttyS0      .udev
char             port                shm       tty35  ttyS1      uinput
console          ppp                 snapshot  tty36  ttyS10     urandom
core             psaux               snd       tty37  ttyS11     v4l
cpu              ptmx                sr0       tty38  ttyS12     vcs
cpu_dma_latency  pts                 stderr    tty39  ttyS13     vcs1
disk             ram0                stdin     tty4   ttyS14     vcs2
dri              ram1                stdout    tty40  ttyS15     vcs3
dvd              ram10               tty       tty41  ttyS16     vcs4
dvdrw            ram11               tty0      tty42  ttyS17     vcs5
ecryptfs         ram12               tty1      tty43  ttyS18     vcs6
fb0              ram13               tty10     tty44  ttyS19     vcsa
fd               ram14               tty11     tty45  ttyS2      vcsa1
full             ram15               tty12     tty46  ttyS20     vcsa2
fuse             ram2                tty13     tty47  ttyS21     vcsa3
fw0              ram3                tty14     tty48  ttyS22     vcsa4
hpet             ram4                tty15     tty49  ttyS23     vcsa5
.initramfs       ram5                tty16     tty5   ttyS24     vcsa6
input            ram6                tty17     tty50  ttyS25     vga_arbiter
kmsg             ram7                tty18     tty51  ttyS26     vhost-net
log              ram8                tty19     tty52  ttyS27     video0
loop0            ram9                tty2      tty53  ttyS28     zero
loop1            random              tty20     tty54  ttyS29
loop2            rfkill              tty21     tty55  ttyS3
loop3            rtc                 tty22     tty56  ttyS30
loop4            rtc0                tty23     tty57  ttyS31

I would like to understand the meaning of the entries listed here. Is there a manual available to help me understand this ?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

In short: All of the are device entries. So anything written to these items will (should) have the corresponding hardware act on it.

Longer copy/paste with lots of examples:

The /dev directory contains the special device files for all the devices. The device files are created during installation, and later with the /dev/MAKEDEV script. The /dev/MAKEDEV.local is a script written by the system administrator that creates local-only device files or links (i.e. those that are not part of the standard MAKEDEV , such as device files for some non-standard device driver).

This list which follows is by no means exhaustive or as detailed as it could be. Many of these device files will need support compiled into your kernel for the hardware. Read the kernel documentation to find details of any particular device.

  • /dev/dsp

Digital Signal Processor. Basically this forms the interface between software which produces sound and your soundcard. It is a character device on major node 14 and minor 3.

  • /dev/fd0

The first floppy drive. If you are lucky enough to have several drives then they will be numbered sequentially. It is a character device on major node 2 and minor 0.

  • /dev/fb0

The first framebuffer device. A framebuffer is an abstraction layer between software and graphics hardware. This means that applications do not need to know about what kind of hardware you have but merely how to communicate with the framebuffer driver's API (Application Programming Interface) which is well defined and standardized. The framebuffer is a character device and is on major node 29 and minor 0.

  • /dev/hda

/dev/hda is the master IDE drive on the primary IDE controller. /dev/hdb the slave drive on the primary controller. /dev/hdc , and /dev/hdd are the master and slave devices on the secondary controller respectively. Each disk is divided into partitions. Partitions 1-4 are primary partitions and partitions 5 and above are logical partitions inside extended partitions. Therefore the device file which references each partition is made up of several parts. For example /dev/hdc9 references partition 9 (a logical partition inside an extended partition type) on the master IDE drive on the secondary IDE controller. The major and minor node numbers are somewhat complex. For the first IDE controller all partitions are block devices on major node 3. The master drive hda is at minor 0 and the slave drive hdb is at minor 64. For each partition inside the drive add the partition number to the minor minor node number for the drive. For example /dev/hdb5 is major 3, minor 69 (64 + 5 = 69). Drives on the secondary interface are handled the same way, but with major node 22.

  • /dev/ht0

The first IDE tape drive. Subsequent drives are numbered ht1 etc. They are character devices on major node 37 and start at minor node 0 for ht0 1 for ht1 etc.

  • /dev/js0

The first analogue joystick. Subsequent joysticks are numbered js1 , js2 etc. Digital joysticks are called djs0 , djs1 and so on. They are character devices on major node 15. The analogue joysticks start at minor node 0 and

  • /dev/lp0

The first parallel printer device. Subsequent printers are numbered lp1 , lp2 etc. They are character devices on major mode 6 and minor nodes starting at 0 and numbered sequentially.

  • /dev/loop0

The first loopback device. Loopback devices are used for mounting filesystems which are not located on other block devices such as disks. For example if you wish to mount an iso9660 CD ROM image without burning it to CD then you need to use a loopback device to do so. This is usually transparent to the user and is handled by the mount command. Refer to the manual pages for mount and losetup . The loopback devices are block devices on major node 7 and with minor nodes starting at 0 and numbered sequentially.

  • /dev/md0

First metadisk group. Metadisks are related to RAID (Redundant Array of Independent Disks) devices. Please refer to the most current RAID HOWTO at the LDP for more details. This can be found at http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html . Metadisk devices are block devices on major node 9 with minor nodes starting at 0 and numbered sequentially.

  • /dev/mixer

This is part of the OSS (Open Sound System) driver. Refer to the OSS documentation at http://www.opensound.com for more details. It is a character device on major node 14, minor node 0.

  • /dev/null

The bit bucket. A black hole where you can send data for it never to be seen again. Anything sent to /dev/null will disappear. This can be useful if, for example, you wish to run a command but not have any feedback appear on the terminal. It is a character device on major node 1 and minor node 3.

  • /dev/psaux

The PS/2 mouse port. This is a character device on major node 10, minor node 1.

  • /dev/pda

Parallel port IDE disks. These are named similarly to disks on the internal IDE controllers (/dev/hd* ). They are block devices on major node 45. Minor nodes need slightly more explanation here. The first device is /dev/pda and it is on minor node 0. Partitions on this device are found by adding the partition number to the minor number for the device. Each device is limited to 15 partitions each rather than 63 (the limit for internal IDE disks). /dev/pdb minor nodes start at 16, /dev/pdc at 32 and /dev/pdd at 48. So for example the minor node number for /dev/pdc6 would be 38 (32 + 6 = 38). This scheme limits you to 4 parallel disks of 15 partitions each.

  • /dev/pcd0

Parallel port CD ROM drives. These are numbered from 0 onwards. All are block devices on major node 46. /dev/pcd0 is on minor node 0 with subsequent drives being on minor nodes 1, 2, 3 etc.

  • /dev/pt0

Parallel port tape devices. Tapes do not have partitions so these are just numbered sequentially. They are character devices on major node 96. The minor node numbers start from 0 for /dev/pt0 , 1 for /dev/pt1 , and so on.

  • /dev/parport0

The raw parallel ports. Most devices which are attached to parallel ports have their own drivers. This is a device to access the port directly. It is a character device on major node 99 with minor node 0. Subsequent devices after the first are numbered sequentially incrementing the minor node.

  • /dev/random or /dev/urandom

These are kernel random number generators. /dev/random is a non-deterministic generator which means that the value of the next number cannot be guessed from the preceding ones. It uses the entropy of the system hardware to generate numbers. When it has no more entropy to use then it must wait until it has collected more before it will allow any more numbers to be read from it. /dev/urandom works similarly. Initially it also uses the entropy of the system hardware, but when there is no more entropy to use it will continue to return numbers using a pseudo random number generating formula. This is considered to be less secure for vital purposes such as cryptographic key pair generation. If security is your overriding concern then use /dev/random , if speed is more important then /dev/urandom works fine. They are character devices on major node 1 with minor nodes 8 for /dev/random and 9 for /dev/urandom .

  • /dev/sda

The first SCSI drive on the first SCSI bus. The following drives are named similar to IDE drives. /dev/sdb is the second SCSI drive, /dev/sdc is the third SCSI drive, and so forth.

  • /dev/shm/

By default Ubuntu has ramdisk mounted into /dev/shm/ directory so you can just copy/move files into that dir and be sure they’ll be stored in RAM memory. That could be useful for, say, video conversion when both input and output files are stored in ramdisk — resulting performance will be better as read and write speeds are higher for ram than for hdd or any other storage. This is due to the fact CPU cannot access to HDD directly while it can do it with RAM.

  • /dev/ttyS0

The first serial port. Many times this it the port used to connect an external modem to your system.

  • /dev/vcs /dev/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.)

  • /dev/zero

This is a simple way of getting many 0s. Every time you read from this device it will return 0. This can be useful sometimes, for example when you want a file of fixed length but don't really care what it contains. It is a character device on major node 1 and minor node 5.

  • Not a complete list but it shows the gist of these items.
  • Large part of it from: linux.about.com. The others by using google ;)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.