How to see mapped drives in Linux

How to see mapped drives in Linux

Hello colleagues.

In today's article, we will talk about what are the options for viewing a list of connected drives in the Linux operating system.

The Linux operating system displays your connected hard drives differently than Windows. Linux displays everything as a file, including devices. All devices connected to Linux are placed in the /dev/ directory, and in this directory you will find your hard drives. The Linux system administrator usually makes a list by listing the drives to check all the disk space in the system. The list of disks will also help you to see all disks and partitions connected to the system.

In Linux, there are several ways to list all hard drives, and today we will learn how to list drives in Linux using the command line.

 

Hard drives in Linux have special names, depending on the interface through which the hard drive is connected.

Name options:

  • sd - connected device via SCSI interface.
  • hd - connected device via ATA interface.
  • vd - is a virtual device.
  • mmcblk - flash drives connected via a card reader.

 

In most cases, devices in Linux are connected via the SCSI interface, this just includes hard drives, so in most cases you will be dealing with sd drives. The third letter in the disk name means its serial number. For example, sda is the first drive, sdb is the second drive, sdc is the third, and so on. This is followed by a number, this is the partition number on the disk - sda1, sda2.

 

1. lsblk

The  lsblk command is  used to normally display information in tree form about all available devices, such as hard drives and flash drives.

$. lsblk

linux disk list


 

2. df -h

The df command is used to list the available disk space in general. The df command prints the device name, total blocks, used disk space, available disk space, percentage of used space, and mount point.

$. df -h

linux disk list


 

3. fdisk -l

The  fdisk command is a utility that is used to manage disk partitions. You can also use fdisk to list the partitions on a disk.

$. fdisk -l

linux disk list


 

4. parted -l

The parted command is a very useful and powerful tool used to manage hard disk partitions from the command line, but it also allows us to view a list of disks and their partitions.

$. parted -l

linux disk list


 

5. lshw

lshw is a cool Linux tool that is used to get detailed information about the hardware configuration of the system, and in order for us to see all information about disks, we additionally need to use the -class disk option

$. sudo lshw -class disk

linux disk list


 

Thank you all, I hope my article was of some help to you.

SIMILAR ARTICLES

How to see Ubuntu version in Linux terminal
How to see Ubuntu version in Linux terminal
LINUX
Linux - How to mount and unmount a drive
Linux - How to mount and unmount a drive
LINUX
Linux - How to format a drive
Linux - How to format a drive
LINUX