doing the partitioning on the command-line: a headstart

thedighubs

Member
Nov 21, 2024
75
6
16
g day dear experts

well i am trying to get some basic skills - skills on the command line:

well guess on a sidenote: Anyone should be able to do this.

Background: When doing a new distro install, I i am sometimes asked to do some partitioning: well - i often let the installer handle partitioning and formatting the disk.

Well i want to get this done on my own:

therefore i need to know how to format a storage drive from the terminal.
a very helpful thing would be to dive into all that steps - and the options for commands and to get a base knowledge that i (hopefully) am able to use to extrapolate future uses.
as said above - i eagerly would like to know how to format in the different file systems such as NTFS, FAT32, EXT4: and yes: i think its a good thing to know how to do the partitioning. Letting this do the installer does not help me to get more command line skills. I need to find out more ways to do things on the command lined.


well; my winter-project is to dive into the partitioning of the disk - and to do this via command line:
and that said - i think its good to dive into some file-systems like NTFS FAT EXT 4 and others more.
These common formats are something that i think are the ones that are used in many many use-cases: So i think i have to get more information on how to partition the drive via terminal.


but well: Cannot i do this with the commandline!?

What do you say? Eagerly look forward to hear from you
 
Last edited:

manly

Lifer
Jan 25, 2000
12,806
3,592
136
The command line tool is parted . Time to exercise your Google-fu but here's a starter article:


Note this article creates an older MBR partition table, but nowadays you should be creating GPT only. Besides your favorite search engine (I use DuckDuckGo), consult your Linux man pages as well. I.e. man mkfs

If you like books, this is a good one:

 
  • Like
Reactions: thedighubs