diff --git a/_Inbox/Linux CLI Config and Commands.md b/_Inbox/Linux CLI Config and Commands.md index 49904c0..8b1491a 100644 --- a/_Inbox/Linux CLI Config and Commands.md +++ b/_Inbox/Linux CLI Config and Commands.md @@ -37,3 +37,24 @@ or apply sudo netplan apply ``` +## drive partitions + +create gpt partition table (for new drives without any partitions) +``` +sudo parted /dev/sdx mklabel gpt +``` + +create new partition +``` +sudo parted -a optimal /dev/sdx mkpart primary ext4 0% 100% +``` + +format the partition +``` +sudo mkfs.ext4 /dev/sdxn +``` + +mount a drive +``` +sudo mount /dev/sdxn /mnt/storage +``` \ No newline at end of file