What is /dev/sda in Linux?

Understanding the concept of /dev/sda in Linux is very important. Over the time students have asked me, “What is /dev/sda in Linux”, here is the answer, let’s dig into it.

What is Linux?

Linux is a collection of open-source Unix type Operating systems which is based on Linux Kernel. It was first introduced by Linus Torvalds in 1991. Popular Linux distributions are – Ubuntu, Linux Mint, Fedora, Arch Linux, Kubuntu, and many more.

Files in Linux

In Linux operating systems each and everything is a file. However, there are many types of files avialable in Linux.

For example, Ordinary Files, Directory Files and Device Files are file types in Linux.

  • Ordinary / General Files contains only data, in other words, it contains all the documents.
  • Directory Files contain Ordinary files as well as Directory Files.
  • Device Files contain all the device files, that is to say, it represents all the hardware devices.

What is /dev in Linux?

Before understanding the /dev/sda in Linux, you must have some knowledge about /dev.

The front slash ‘/’ is the root in Linux and, dev is a directory file containing device files under root. The root file systems have to be present in every Linux operating system. The root file system contains all the tools to keep the system on. After the system boots up in single-user mode, this is the only file system that is available to the system administrator.

/dev in root folder.

What is /dev/hda in Linux?

/dev/hda is the master IDE(Integrated Drive Electronics) drive on the primary IDE controller. Linux takes the first hard disk as a whole hard disk and it represents it by /dev/hda. The individual partitions in the disk take on names like hda1, hda2, and so forth. hd2 is the second IDE hard disk.

What is /dev/sda in Linux?

The term sd stands for SCSI disk, that is to say, it means Small Computer System Interface disk. So, sda means the first SCSI hard disk. Likewise,/hda, the individual partition in the disk takes names as sda1, sda2, etc..

dev sda in linux

The active partition is indicated by an * in the middle column. The middle column refers to the “Status” of that particular partition. Status has two-state, Inactive, and Active.

The second hard disk will have the name /dev/sdb with the same numeric expressions.

SDA file structure

The lsblk command lists all the information about the specified block devices. The sda tree structures look like this

sda using lsblk.
What is /dev in Linux?

The front slash ‘/’ is the root in Linux and, dev is a directory file containing device files under root. The root file systems have to be present in every Linux operating system. The root file system contains all the tools to keep the system on. After the system boots up in single-user mode, this is the only file system that is available to the system administrator.

What is /dev/hda in Linux?

/dev/hda is the master IDE(Integrated Drive Electronics) drive on the primary IDE controller. Linux takes the first hard disk as a whole hard disk and it represents it by /dev/hda. The individual partitions in the disk take on names like hda1, hda2, and so forth. hd2 is the second IDE hard disk.

What is Kernel and Shell in Linux?

The Kernel is a collection of programs mostly written in C that directly communicate with the hardware. The Shell is actually the interface between the user and the kernel that effectively insulates the user from the knowledge of kernel functions. Read this to learn more.

In case you still have questions, contact experts from Essay Mill.

Sayan De

Sayan De has a B.Tech in Computer Science & Engineering degree and currently pursuing his M.Tech in CSE. His interest area of work is Machine Learning, Deep Learning, Deep NLP, Computer Vision, Data Science, Linux, and a little bit of Website Development.

9 thoughts on “What is /dev/sda in Linux?

  • November 7, 2019 at 10:01 PM
    Permalink

    Thanks for the insight. Helpful and quality content. Cheers!

    Reply
  • May 29, 2020 at 2:08 AM
    Permalink

    Thank you for the information. Short and enlighten.

    Reply
    • May 29, 2020 at 6:54 AM
      Permalink

      You are welcome… Please Subscribe to get more updates.

      Reply
  • July 5, 2020 at 1:10 PM
    Permalink

    so question is how we can use /dev/sda2 or /dev/sda3 etc we can do cd to that partition and so as we cant create any dir and files in it

    Reply
    • July 5, 2020 at 3:10 PM
      Permalink

      They are basically your hard disk partitions, if you want to create any directory you’ll need root access.

      Reply
      • July 5, 2020 at 3:22 PM
        Permalink

        ya i have root access i want to create directory in them sda3 so that i can add as storage to virtualizor. so can u tell me how to do it , because i tried to do /dev/sda3 i was not able to change directory to that partitions

        Reply
        • July 5, 2020 at 3:24 PM
          Permalink

          Do you have a dual boot computer? want to mount the Windows partitions?

          Reply
          • July 5, 2020 at 3:48 PM
            Permalink

            no i do not have dual boot computer

          • July 5, 2020 at 3:59 PM
            Permalink

            Sorry, can’t help with the virtualizer.
            You may run nautilus from the terminal.

Leave a Reply

Your email address will not be published. Required fields are marked *