From dcb42763798c1da3ef90f2e50c0cd390a5d995d1 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Sun, 8 Jan 2023 18:00:17 +0000 Subject: [PATCH] Autosave: 2023-01-08 18:00:17 --- Linux/Procedural/Disk_info.md | 19 +++++++++++++++++++ Operating_Systems/Disks/Filesystems.md | 2 +- Operating_Systems/Disks/Partitions.md | 8 ++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Linux/Procedural/Disk_info.md diff --git a/Linux/Procedural/Disk_info.md b/Linux/Procedural/Disk_info.md new file mode 100644 index 0000000..1b01e7b --- /dev/null +++ b/Linux/Procedural/Disk_info.md @@ -0,0 +1,19 @@ +--- +categories: + - Linux +tags: [systems-programming] +--- + +# Disk info routines + +## Current disk capacity + +```bash +df -h +``` + +## Disk last modified + +```bash +stat [disk_name] +``` diff --git a/Operating_Systems/Disks/Filesystems.md b/Operating_Systems/Disks/Filesystems.md index d62ce75..b374b49 100644 --- a/Operating_Systems/Disks/Filesystems.md +++ b/Operating_Systems/Disks/Filesystems.md @@ -26,7 +26,7 @@ mkfs -t ext4 /dev/sda2 ## Mounting a filesystem -We can now mount our filesystems. Whem we mount, we must specify the following criteria with the request: +We can now mount our filesystems. When we mount, we must specify the following criteria with the request: - The name of the device we want to mount. - This will be the name or the partition. However the names (`sda` etc) assigned by the OS can change. In these cases and with GPT-based partitions you can use the UUID. diff --git a/Operating_Systems/Disks/Partitions.md b/Operating_Systems/Disks/Partitions.md index 869cab5..5934264 100644 --- a/Operating_Systems/Disks/Partitions.md +++ b/Operating_Systems/Disks/Partitions.md @@ -238,4 +238,12 @@ sda 8:0 0 465.7G 0 disk └─sda2 8:2 0 365.7G 0 part ``` +#### Naming a partition + +By default each partition will have its GUID as its name, but you can add a human friendly name with: + +```bash +sudo e2label /dev/sda1 my_human_name +``` + > Whilst we have created our partitions we cannot yet mount them. This is because we have not yet set up a filesystem on the partitions. This is the next step.