sw_vers
Syntax:sw_vers
Explanation:Displays a system summary of your Mac.
- Product name
- Version of your O/S
- Build-version
system_profiler
Syntax:system_profiler [-Options or Type(s)]
Usage/Explanation:Displayed detailed information about your Mac including the hardware.
Options
-detailLevel <lvl> | Decide how detailed the description will be. <lvl> can be mini, basic or full. |
-listDataTypes | Displays all available categories (as specified below). |
CategoriesBelow is a list of all available information categories you can choose to view.
- SPHardwareDataType
- SPNetworkDataType
- SPSoftwareDataType
- SPParallelATADataType
- SPAudioDataType
- SPBluetoothDataType
- SPDiagnosticsDataType
- SPDiscBurningDataType
- SPEthernetDataType
- SPFibreChannelDataType
- SPFireWireDataType
- SPDisplaysDataType
- SPHardwareRAIDDataType
- SPMemoryDataType
- SPPCIDataType
- SPParallelSCSIDataType
- SPPowerDataType
- SPPrintersDataType
- SPSASDataType
- SPSerialATADataType
- SPUSBDataType
- SPAirPortDataType
- SPFirewallDataType
- SPNetworkLocationDataType
- SPModemDataType
- SPNetworkVolumeDataType
- SPWWANDataType
- SPApplicationsDataType
- SPDeveloperToolsDataType
- SPExtensionsDataType
- SPFontsDataType
- SPFrameworksDataType
- SPLogsDataType
- SPManagedClientDataType
- SPPrefPaneDataType
- SPStartupItemDataType
- SPSyncServicesDataType
- SPUniversalAccessDataType
Exempel
system_profiler | Displays information about your Mac computer (standard level) |
system_profiler -detailLevel mini | Displays a minimal summary of your system information. |
system_profiler SPHardwareDataType SPNetworkDataType | Only display information from the category SPHardwareDataType and SPNetworkDataType. |
diskutil
Syntax:diskutil <funktion> [-Options]
Explanation:Manage all mounted disks on your Mac: Harddrives, network drives etc.
Example of things you can do with diskutil
- List all mounted discs/harddrives on your Mac
- View information about a disc/harddrive
- Unmount a disc
- Change name of a disc
- Verify and repair data on a disc.
- Format a disc
- Partition discs/harddrives
More information
- Apple Developer – diskutil
- SS64 – diskutil (non-official)
df
Syntax:df [-Options]
Explanation/Usage:Displays space usage of your discs: Total size, space usage, available space.
Options
-h | View space usage in readable values: kilobytes/megabytes/gigabytes instead of just bytes. |
-l | Only show local discs (no network drives and such). |
Example
df -h | Disk space usage displayed in kb/mb/gb |
df -l | Disk space usage on local drives. |
uptime
Syntax:uptime
Explanation:Display the uptime of your computer/how long your computer has been turned on.
last reboot
Syntax:last reboot
Explanation:Displays a list of date with the exact time when you last rebooted your computer.
More to read: Post tweets directly from the Terminal in Mac OS X using cURL