Linux command to create partitions

I’m looking for the correct command to create partitions aligned correctly.
I normally do this using “diskpart” after booting a Windows 10 install disk and running command prompt.
The Windows command would be simply create partition using diskpart for a 250gig primary partition.
And then extended plus logical

**create partition primary align=1024 size =250000
**create partition extended align=1024
****create partition logical align=1024 size =(megabytes)


What is the equivalent linux command please ?

I normally use “fdisk” for this. You can also use “parted”.

Some parted guides that may be of interest…
https://wiki.archlinux.org/index.php/Parted
https://phoenixnap.com/kb/linux-create-partition

You already asked exactly the same question (and with better and more clear title) month ago:

https://forums.opensuse.org/showthread.php/546355-Linux-command-to-create-aligned-partitions

Any reason you needed to create another thread with completely identical question?

I got a lot of mixed answers and just wanted to see if someone had a different take on this.
Thanks for the feedback !

My take is that your question might have some academic value but probably has limited real world value.

So, for instance skim through the ArchWiki on Parted…

https://wiki.archlinux.org/index.php/Parted

You’ll find barely any mention specifying by command starting a partition on a particular megabyte. Yes, it’s a maybe not terribly rare scenario but when you do this means that there can be problems of alignment.
You’ll find other recommended or commonly used parameters like how to automatically align with the beginning or end of free space and whether to automatically fill all free space. All these settings would ensure that you utilize all available free space and automatically make adjustments for the size of your sectors.

And,
For a lot of people the GUI tools like Parted and GParted are so easy to use and assure an optimum result, unless you do a lot of partitioning to keep up your skillset, you’ll probably find it easier and better to use a graphical tool.

TSU

KDE Partition Manager sometimes is more useful than GParted.

Parted is a CLI utility.