getconf: bootinfo replacement

root's picture

Probably not many know that bootinfo comand is deprecated and it has been replaced by getconf. Now, don't get scared because bootinfo is still there for backwards compatibility and I am pretty sure it will still be there for a long time. The best part now is that we have a better alternative.
Please find below some getconf examples and if you need more, please use the magic words man getconf

What is the device from which the system was last booted from:

$ getconf BOOT_DEVICE
hdisk0

What is the size of a particular disk:

$ getconf DISK_SIZE /dev/hdisk0
32768

What is the partition size used on a disk:

$ getconf DISK_PARTITION /dev/hdisk0
64

How to check if the machine is capable of running a 64-bit or 23-bit kernel:

$ getconf HARDWARE_BITMODE
64

How to verify if the system is currently running a 64-bit or 32-bit kernel:

$ getconf KERNEL_BITMODE
64

How to see the real memory size:

$ getconf REAL_MEMORY
1048576

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content