The terminal version of Disk Utility is actually much better than the GUI (it doesn't hang and the app is glitchy.
Docs are at https://ss64.com/mac/diskutil.html
loading story #42069049
`pdisk` might be more convenient if you've worked with `gdisk` on ArchLinux
loading story #42064752
loading story #42063313
Or "man diskutil"