Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List all harddrives in a linux system [closed]

Tags:

I'm having problems to detect which one of my block devices is the hard drive. My system has a cd-rom drive, USB drives, and a single hard drive of unknown vendor/type.

How can I identify the hard drive with a linux command, script, or C application?

like image 414
Allan Avatar asked Aug 18 '11 11:08

Allan


People also ask

How do I see all hard drives in Linux?

List Disks on Linux using lsblk. The easiest way to list disks on Linux is to use the “lsblk” command with no options. The “type” column will mention the “disk” as well as optional partitions and LVM available on it. Optionally, you can use the “-f” option for “filesystems“.

How do I list all drives in Ubuntu?

First, open GNOME Disks from the Application Menu. GNOME Disks should be opened. On the left side, you will see all the attached storage devices/disks on your computer. To find more information about the disk, click to select the disk.

How do I show unmounted drives in Linux?

How to show Unmounted drives using the “fdisk” command: The format disk or fdisk is a Linux menu-driven command-line tool to create and utilize the disk partition table. Use the “-l” option to read data from the /proc/partitions file and display it. You can also specify the disk name with the fdisk command.

How do I see partitions in Linux?

Typing fdisk -l at the command prompt will list all of the partitions on your Linux system. You can also use the fdisk command to create, delete, or resize partitions.


1 Answers

sudo lshw -class disk 

will show you the available disks in the system

like image 158
Daniel Fekete Avatar answered Dec 24 '22 00:12

Daniel Fekete