From e4d95d06c3451c88593232a6917f80399ced62f8 Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Thu, 7 Jul 2022 19:30:05 +0100 Subject: [PATCH] Last Sync: 2022-07-07 19:30:05 --- Operating_Systems/Disks.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Operating_Systems/Disks.md b/Operating_Systems/Disks.md index 106dfd6..5a23876 100644 --- a/Operating_Systems/Disks.md +++ b/Operating_Systems/Disks.md @@ -28,6 +28,22 @@ The following diagram represents the basic anatomy of a disk device. ### Viewing current partitions Whenever you install a Linux distribution on a real or virtual machine, you must partition the drive. There are three main tools to choose from: `parted`, `g(raphical)parted`, `fdisk`. +For a top-level overview of your disks and their main partitions you can run `lsblk` (_list block devices_): + +```bash +$ lsblk + +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS +sda 8:0 0 465.7G 0 disk +├─sda1 8:1 0 200M 0 part +└─sda2 8:2 0 465.4G 0 part /run/media/thomas/ganesh +nvme0n1 259:0 0 476.9G 0 disk +├─nvme0n1p1 259:1 0 488M 0 part +├─nvme0n1p2 259:2 0 27.9G 0 part / +└─nvme0n1p3 259:3 0 448.5G 0 part /home +``` + + We can use `parted -l` to view the partition table for the current machine: ```bash