You've got a good point there. The basic "diskutil list" is useless. It is "diskutil list -plist" that has more meaningful information, including all of the containers. I try to present the information as accurately as I can in EtreCheck. But even then, on a Fusion drive, it is really difficult to make any sense out of it. And then when Apple added the snapshots in Monterey, it's just insane.
The goal here is to be able to obtain information about all storage devices based on its label or other uniquely identifying attributes, even if it hasn't been mounted, thus df is not a viable option.
From at least High Sierra 10.13.6 you can use the system profiler (About This Mac > System Report > SATA/SATA Express) to give you a list of all mounted SATA devices and get the UUID of each mounted Disk by name. If you have unmounted drives use Disk Utility to mount them.
NOTE: In your goal, you did not say that you wanted to obtain all information about all disks all at once in one command. So I am not answering that question, as your originaly question seems different than your stated goal. You may want to make some edits to specify what you are trying to accomplish and how.
I can't find it in Ubuntu to view files, and Ubuntu is the only OS on that particular computer. I was wondering if Ubuntu has an equivalent to the Windows feature "My Computer", which lists all available drives/storage devices. Typically, My Computer shows C:, which can be opened to view all of your directories and files. At this point, it is very similar to Ubuntu's Home Folder.
You can play around with the options by first looking at the ones available with lsblk --help. I like lsblk because of the friendly way of showing the information if compared for example with fdisk or parted.
As you can see, the first column is the current logic name (or the name you can find it within your system), the second column is how big is each of them, the third column is how much is currently used (in bytes), the fourth column is how much is currently available in each for usage (in bytes), the fifth column is how much is used (in %) and the sixth and last column is where is it physically mounted in your Linux system.
This will return the entire amount of space (in GB or MB), the entire amount of bytes and the entire amount of sectors per each partition and as a summary, it also gives you the start and end sectors, the amount of disk space (in Bytes) and the type of partition.
It is probably more visual than the others as it even shows the partitions per each disk in a visual way (like the sda in the example above). It also gives information about the total size per each partition and disk and the physical location for each. This is very commonly used when you need to mount things to be used (like a USB stick or similar) so you can know where is it in order to proceed to mount it.
This one is similar to previous ones mentioned, it lists all partitions and allows to manage them. Its main difference is that it also informs you the brand and model of your hard disks and even the type of connectivity used in it (scsi, sata, etc) and total disk size.
These commands should allow you to at least see what logical volumes, partitions and hard drives you have in your system and make use of this information for whatever reason you need it, being this just to know more or manipulate any of these.
To list all mounted drives and their accompanying partitions from the Terminal on Mac OS X, you can use the diskutil command with the list flag. This approach will display all disks, drives, volumes, and containers on any drive connected to the Mac, including boot volumes, hidden volumes (like the Recovery partition), empty volumes, unformatted drives, and all other disks.
This will give you feedback displayed like the following, listing out the mounted drives, their volume names, the size of the drive and partitions, their partition types, and their identifier location:
This is also demonstrated in the screenshot shown above with a much more accurate representation of formatting, when it is printed in your own terminal it will display nicely in tables, making it easily scannable and readable.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
For us human beings this doesn't make much sense. To have human-readable information we must translate this number into bytes.So, we have a disk already partitioned and we want to know how much space we may use. I personally don't like the parted solution because my brain-memory for commands is already taken. There is also cfdisk, which gives you free space. But I think fdisk is the quickest solution: it's plain and simple, with nothing to install: execute fdisk /dev/sdx and then enter v into the interactive shell. It will gives you the number of sectors still free.
While using the disk utility graphically, it shows disk space used by all filesystem and it uses commands in the terminal such as df -H. In other words, it uses powers of 1000, not 1024. (Note: there is difference between -h and -H.)
when you cut you disk in partitions by fdisk you may be careful so as not to left gaps with free space. So command automatically align partitions and you'll get some gaps between parts. There are many articles in net why need to do so. The reason is that it gives solution with less errors. That was many years ago. Now I don't know is there errors occurs if you do all without any gaps. But first. You may do so if you don't allow alignment you sen begin of the next part=end previous+1. But is first part begins always with 2048 sector. So call expert part you may shift it to 0. But strongly recomended to do so if you plan to boot from this disk. If only for data you'll gain 1 Mb additional disk space. This is an MBR space. If you plan to install OS on this disk you don't use GPT partition type. Also it's more suitable not all OS see GPT parts of disks. But some see them. If you don't sure it use msdos. While format the block size is 4096 bytes(logical) physical one is 512 bytes. I don't do so but you may set block size=512 too. There was many discussion about that. It's lead to disk errors. But you'll give some free disk space too especially when you have many small size files. You disk will fill more compactly. And if you give already partitioned disk with filled them with data and maybe installed OS you maybe want to do so, it was very problems to do. But is possible for Linux. For Windows no... You must save backup and mbr too, write UUID every part then use fdisk and format as setting right UUID and LABEL for every part restore mbr with dd command and if you don't do any wrong all will be work as before but without any gaps.
Before you can use diskpart commands, you must first list, and then select an object to give it focus. After an object has focus, any diskpart commands that you type will act on that object.
When you select an object, the focus remains on that object until you select a different object. For example, if the focus is set on disk 0 and you select volume 8 on disk 2, the focus shifts from disk 0 to disk 2, volume 8.
You can only give focus to a partition on the selected disk. After a partition has focus, the related volume (if any) also has focus. After a volume has focus, the related disk and partition also have focus if the volume maps to a single specific partition. If this isn't the case, focus on the disk and partition are lost.
You can view a list of options associated to each command by running the main command followed by what is available to that specific command. Running list by itself will display the four parameters below:
Disk Utility, the macOS Swiss Army knife for working with disks and storage volumes, may have a few blades missing, especially when it comes to working with unformatted drives and unused space on a disk or storage volume.
In versions of Disk Utility that came with OS X Yosemite and earlier, you could enable hidden debug modes in the Disk Utility app that allowed you to see and interact with all the space on a disk, including hidden elements, such as the Recovery volume or the secret EFI partitions.
Using Disk Utility to Access All Devices
Disk Utility is configured by default to only show formatted volumes. This makes using Disk Utility with existing volumes an easy task since there are only a few, and sometimes only one, volumes displayed, cutting down on what could be an overwhelming list of disks, containers, volumes, RAID slices, etc.
The disadvantage, however, is that it can make it difficult to work with new unformatted disks you may be using for the first time. This includes working with unformatted drives as well as unformatted USB flash drives.
Disk Utility lets you pick which display mode to work in: Volumes only, All Devices, or only a selected drive. You can switch between them at any time, and Disk Utility will update the display immediately; no need to close and reopen the Disk Utility app or restart your Mac.
Show All Devices
This setting will display all storage devices connected directly to your Mac. In addition to each device being displayed, a hierarchical listing will show how each device is organized, i.e., how many containers, partitions, or volumes each device contains. Absent from the hierarchical view will be any of the items Apple has decided to hide from the end user, such as EFI volumes and Recovery volumes.
The Sidebar will change to display all locally connected devices, presented in a hierarchical view starting with the physical device, than any containers and volumes the device may have been partitioned into.
Erasing or Repairing a Volume
If all you need to do is erase an existing volume or attempt to repair a volume, you can use either the Show Only Volumes or Show All Devices view. If you need instructions for repairing a volume, check out the following Rocket Yard Guide: