Sobes.tech
Junior — Middle

How can you list the connected disks on a server?

sobes.tech AI

Answer from AI

To list connected disks on a Linux server, you can use several commands:

  • lsblk — shows all block devices and their mount points.
  • df -h — displays used and free space on mounted filesystems.
  • fdisk -l — provides information about all disks and partitions.
  • mount — shows all mounted filesystems.

Example:

lsblk

This will display a device tree with sizes and mount points.

In Windows, you can use the command:

diskpart
list disk

Or in PowerShell:

Get-PhysicalDisk

Thus, the choice of command depends on the server's operating system.

How can you list the connected disks on a server… - sobes.tech