Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Instagram Youtube

Github Stackoverflow Pinterest

It’s stylish because it’s expensive

Overview

Hardware Versions

  1. Click the Apple icon at the upper left corner and select About this Mac.

    macOS Mojave 10.14 can run using these hardware models:

    • MacBook Pro (mid 2012 and newer)
    • MacBook Air (mid 2012 and newer)
    • MacBook (early 2015 and later)
    • iMac (late 2012 or newer)
    • iMac Pro (2017 or newer)
    • Mac Pro (late 2013 or newer, or mid 2010 and mid 2012 models with Metal capable GPU)
    • Mac Mini (late 2012 or newer)

    http://osxdaily.com/2018/09/27/run-macos-mojave-unsupported-mac-dosdude-patch/

    MacOS Sierra can run using these hardware models:



    See my hands-on tutorial about MacOS Versions

    Performance rankings

  2. Compare the performance rankings among hardware models at http://browser.geekbench.com/mac-benchmarks/

    Install Geekbench to obtain CPU Benchmark statics for your own machine posted on their website.

    The Compute Benchmark is run and posted separately.

Mac Specs.

The 2018 version of 15-inch MacBook Pro:

  • Intel Core i7, Core i9
  • Max DDR4 RAM of 32GB (up from 16GB)
  • Max 2TB to 4TB SSD
  • Quieter third generation keyboard
  • Touch Bar
  • Radeon Pro discrete graphics with 4GB of video memory
  • Retina Display True Tone (still not a touch screen)
  • T2 system on chip processor for security features

Hackintosh

If you need more than 16 GB RAM or add PCI add-in cards, build an (unsupported) Hackintosh desktop on PC hardware. For example: a water-cooled i7–8700k processor, 8GB RX580 graphics card for a 4K LG HDR monitor. Oh, and a pair of Yamaha HS5 studio monitors (speakers) with a Roland audio interface. Plus SSD and HDD storage.

VIDEO: Rick Beato’s Hackintosh build

talks about the Clover Boot Loader

Alas, Apple’s Kalamata project announced they will use their own chips instead of Intel chips which make Hackintosh possible via an x86 boot loader.

Register it. Now.

Find your serial number then confirm your warranty and support status:

  1. Click the Apple icon at the upper left corner and select About this Mac.

  2. Double-click to the right of the “Serial Number” label and press command + C to copy it to your internal clipboard.

  3. PROTIP: Paste the serial number in a document that you store separate from your laptop so that you’ll have it in case your laptop is lost or stolen. Notify someone about that location in case you’re lost or stolen ;)

  4. Click the red X at the upper-left of the pop-up to dismiss it.

  5. Open web page: Apple Online Service Assistant

  6. Click on the box under “Enter your serial number” and press command + V to paste.

  7. Click on the box under “Please enter the code” and retype the jumbled letters.

  8. Click Continue.

    PROTIP: AppleCare Protection Plan (APP) can be purchased for 3 years.

    BLAH: Liquid damage is not covered by AppleCare because it’s so common, even though many consider that a defect. There should be drainage.

    MacBooks have several physical Liquid Contact Indicators (LCI) that turn color when exposed to liquid.

    • https://www.youtube.com/watch?v=x1ALMOgXams
    • https://www.youtube.com/watch?v=Setz768BcJ0
    • https://www.youtube.com/watch?v=x1ALMOgXams
    • https://www.youtube.com/watch?v=e_5lzXGtanQ
    • https://www.youtube.com/watch?v=RqIQcV2Viy8

Identify your Mac for tear-down instructions such as for MacBook Pro A1398 (Retina, 15-inch,Early 2015).

Case

Dropping a Macbook can crack the screen.

A protective case can absorb some abuse, but adds to weight.

Unlike some PCs, MacBooks do not have a slot for physical lock as many Windows PCs have.

To put a Mac at the end of a cut-proof cable, consider the docking station from Landing Zone. Install its driver from: https://landingzone.net/driver-lxd

Screws on case

Apple uses tiny screws for their products. Screws for older Mac Book Pro’s have a “+”” pattern requiring a 1.5mm screwdriver. Screws for newer Mac Book Pro’s have a 5-point design which require a screwdriver called the “pentalobe” Torx T6.

iPhones require a T6 Torx 0.6 screwdriver. The Phillips PH#00 is a little too big.

Screws on the black hindge edge are longer.

Cooling

The Macbook Pro has always had a history of running hot.

If you’re only using power when plugging into the Mac’s USB hub connector, use an external USB power that plugs straight into the wall outlet.

Use of an external monitor may also cause the fan to engage.

Battery

Install https://macdaddy.io/mac-battery-guru/ to display current battery drain.

macbook-hardware-battery-307x366

The number shown at the top is 0 (zero) when the laptop is plugged in.

Charger

13 inch diagonal MacBooks use a 65 watt charger cube.

15 inch diagonal MacBooks use a 85 watt charger cube. Newer ones from 2017 have a removeable USB-C cable. This solved a long-standing issue with the cable fraying near the plug.

Have a Formlab 2 3D printer? Make a Magsafe anti-fray Apple charger:

apple-macbook-hardward-fray-537x243-34850

That may be a good thing considering Apple’s 85W charger costs $79 on Amazon and elsewhere.

USB-C ports

2015 Macbooks don’t come with older USB-B ports so one has to buy $19 Apple proprietary adapter cables.

Another power plug runs $49

New Macbooks combine power and communication (Ethernet) into a single proprietary oblong rounded USB-C connector. USB-C connectors can be inserted on either side (unlike earlier USB plugs). It follows the USB 3.1 standard, which has a theoretical maximum speed of up to 10Gbps (gigabits per second) – two times faster than USB 3.0. But the Macbook is at 5Gbps for now.

USB 3.1 support is used by Apple’s $79 HDMI/VGA connector and by upcoming MHL (Mobile High-definition Link) 3 devices to stream 4K video from mobile devices to TV sets. That would obsolete ChromeCast.

Get a USB-C to USB-B cable. Plug it into a battery pack and you can charge the laptop.

This $90 adapter from Amazon works for me: apple-macbook-hardware-adapter-569x345-43408

Camera

If I installed a QR reader on my iPhone, I can read a QR code to take me to the URL represented by the code.

You can read a printed QR code by holding up to your Mac’s Facetime camera using app “QuickMark”.*

BTW there used to be a $2.99 QR Right app.

MacOS apps QReader and “QR Journal” for those with the Apple iSight A1023 USB external camera from 2003 (or iSight compatible). It connects to the Firewire port on older Macs. And some reviewers report crashes.

The $16 SwitchResX app is advertised as a screen size formatter for Mac Retina-friendly HiDP screens and for making Macs into teleprompters.

How can one read a QR code appearing on a Mac screen?

After you create a QR code using qrstuff.com and download the png file, or use an image editor to create an image file containing a QR code, upload the file to:

https://zxing.org/w/decode.jspx

Alternately, install imagemagick as a dependency to this app using Homebrew:

brew install zbar

Then specify the file:

cd ~/Downloads & zbarimg qrcode_file.png

The response should be the text (URL) embedded in the QR code image.

Trackpad and Mouse Speed

  1. In a Terminal window, get the current setting:

    
    defaults read -g com.apple.trackpad.scaling
    

    In System Preferences, Mouse, if you max out the slider to the right, the value is 3.

  2. To set the maximum speed up for Touchpad in a bash shell script:

    
    defaults write -g com.apple.touchpad.scaling  3.0
    
  3. PROTIP: If you use an external mouse a 24 inch iMac, use the command to set a faster speed than what can be set in the GUI:

    
    defaults write -g com.apple.mouse.scaling  5.0
    

If you drag and drop didn’t work on the Trackpad, relaunch Force Quit the Finder.

If that still doesnt’ work, follow this blog which advised from the OS X Finder, hit Command+Shift+G for the “Go To Folder” screen to specify ~/Library/Preferences/ as the destination. Then drag:

  • com.apple.AppleMultitouchTrackpad.plist
  • com.apple.driver.AppleBluetoothMultitouch.trackpad.plist
  • com.apple.preference.trackpad.plist
  • com.apple.driver.AppleBluetoothMultitouch.mouse.plist
  • com.apple.driver.AppleHIDMouse.plist

Stylus on Touch Pad

Pen tablets are useful on Photoshop, Sketch, Pixelmator and other paint and calligraphy programs. Google’s training videos use them for live illustrations.

Some professional drawing tablets are hundreds of dollars.

NOTE You can turn the touch pad on MacBook Pro laptops into a drawing tablet by installing the $29.95 Inklet OSX program which runs in the background.

If you have a new Apple MacBook Pro, Inklet takes advantage of its “Multitouch Force Touch” trackpad that senses different levels of pressure.

Inklet recognizes those squishy rubber-tipped capacitive stylus given out by vendors at conferences and sold at dollar stores. For more precision, Inklet’s $44.90 combo package includes the $19.95 Pogo stylus (not the https://www.amazon.com/Ten-One-Design-T1-PGCT-302-Bluetooth/dp/B009K448L4/ Pogo Connect or Magnus Air even though they are also useful on 3D touch iPhone and iPads.)

Inklet has a palm rejection feature that ignores where hands typically rest on the touch pad while drawing with the stylus.

Open a drawing program before opening Inklet tablet mode by a) clicking on the droplet icon and select ‘Start Inklet’, b) sliding across the bottom of the track pad. or c)vuse the hotkey control+option+i. A transparent workspace appears where drawing occurs from the trackpad.

Wrist Rest Cushion

I like some cushioning for where my palm touches the cold hard keyboard and on sharp edges of the Mac Pro Retina laptop.

In https://support.apple.com/en-us/HT203671 Apple recommends against use of palm pads, as the pads puts uneven pressure on the display glass.

The pads also cause a line of dust on the screen.

Unlike the much better looking leather $29 TwelveSouth, the $9.99 GRIFITI Palm Pads is removeable (rests on rather than glued on the keyboard), so it can be taken off before closing the cover.

System Profiler File Redirect

MacOS has a single command to obtain details about your machine in a single file.

Good to provide tech support when you’re dealing with a nasty problem.

There is a lot of information, so we use it to show use of some command-line kung fu:

  1. Redirect the output to a dated file using the > symbol, but change the sample date as you type this command:

    cd ~
    system_profiler >system_profiler_2017_06_11
    

    This takes a while to run.

  2. In the Terminal, highlight the file name and press Ctrl+C to copy it to your Clipboard.
  3. To count the number of lines in that output file above:

    wc system_profiler_2017_06_11

    The response I got:

    72759  346086 3353663 system_profiler_2017_06_11
    

    In the example above, 72759 is the number of lines, 13346086 is the number of words, and 3353663 is the number of characters.

    SIDE NOTE: This is more than the number (64922) obtained from the nl command which adds a line counter as it displays each line.

System Kernel State

This is rather geeky, but just so you know:

sysctl -a hw

-a lists all the currently available non-opaque values.

detailed description of these.

hw.ncpu: 8
hw.l3cachesize: 6291456
hw.l2cachesize: 262144
hw.l1dcachesize: 32768
hw.l1icachesize: 32768
   

sysctl kern.clockrate

kern.clockrate: { hz = 100, tick = 10000, tickadj = 2, profhz = 100, stathz = 100 }
   

sysctl vm.swapusage

vm.swapusage: total = 2048.00M  used = 320.50M  free = 1727.50M  (encrypted)
   

System Preferences

  1. If you don't see the Apple icon at the top of the screen, move the cursor to the very top of the screen for a few seconds.
  2. Click on the Apple icon at the upper left corner.
  3. Select System Preferences. mac-system-prefs-10 12 5-285x280-35kb

Display

  1. Click the Apple icon for System Preferences
  2. Hold down Command+Option and click Displays so the Rotation selection is visible.
  3. In the dialog for the additional screen, select 270 for the vertical screen. WARNING: Use of additional screens often cause the laptop fan to activate due to the additional heat from additional CPU usage.
  4. Set Resolution to Scaled
  5. Test Page reports the screen and resolution along with browser version.
  6. The Mac Pro 15 inch retina display is preconfigured to a screen resolution of 1440 wide x 900 high,
    but a browser window of 1440 x 738.
  7. Click one of the 5 resolutions between Larger Text and More Space.

Control lights

To control Phillips Hue light bulbs from your Mac’s menu bar, get and install Colors for Hue 4+ by Furiki Designs. Click on the hub’s button.

Sound

Startup Sound Suppressor Applescript

Until Apple realizes how annoying it is to have that start-up sound on a Mac, create in the /Library/Scripts folder shell scripts containing osacript (Applescript) commands to mute sound automatically before reboot, and un-mute after reboot.

  1. Open a terminal and type in nano. Press Enter.

    Type this in the nano editor that pops up this shell script (starting with the she-bang #! characters):

    #!/bin/bash
    osascript -e 'set volume with output muted'
    
  2. Press Ctrl+O, then when it asks you for the filename type in

    ~/Documents/mute.sh

  3. Hit Enter to save the file. This puts the mute script in your Documents folder (don’t worry, we’re going to move it later).

  4. Create the unmute.sh script:

    #!/bin/bash
    osascript -e 'set volume without output muted'
    

    (In older versions the unmute script instead has

    set volume with output unmuted.

  5. Press Ctrl+X, press Y to agree, then type in

    ~/Documents/unmute.sh

  6. Hit Return to save the new file, and nano should quit.

  7. To make the scripts executable, run the following commands in the Terminal, hitting Enter after each one

    sudo chmod u+x ~/Documents/mute.sh
    sudo chmod u+x ~/Documents/unmute.sh
    sudo mv ~/Documents/mute.sh /Library/Scripts/
    sudo mv ~/Documents/unmute.sh /Library/Scripts/

  8. Set the scripts to run automatically:

    sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/mute.sh
    sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/unmute.sh

  9. Close the Terminal, save data in all other apps, and reboot your machine.

  10. To undo the above actions, set defaults in a Terminal window:

    sudo defaults delete com.apple.loginwindow LogoutHook
    sudo defaults delete com.apple.loginwindow LoginHook
    

For more about Applescript commands and hooks, see this.

Microphone Mute App

All Macs have a microphone that picks up your voice and other sounds in your room.

BLAH: To mute the internal microphone on a Mac, there is NO icon among dedicated keys on the keyboard like there is for speakers. A terrible oversight because that’s just as important.

The easiest option is to get the MuteMyMicFree app by Michal Konrad Owsiak:

mac-mutemymic-39x228-7k

  1. Open a web browser to https://itunes.apple.com/pl/app/mutemymicfree/id567195825?mt=12
  2. Click View in Mac Ap Store.
  3. In the App Store pop-up, click Get, then Install app.
  4. Click Open.
  5. Click the microphone icon on the menu bar at the top of the screen:
    mac-mutemypic-icon-60x60

  6. Click the gear icon in the pop-up.
  7. Check the “Start MuteMyMic automatically during login”.
  8. Click the Quit button, the the other Quit button to dismiss the dialog.
  9. Press command+Tab to the App Store.
  10. Press Open, then Quit out the App Store.

Alternately, if you’re afraid of or cannot install downloaded apps, reduce the input volume to 0:

  1. Click on the Apple logo at the upper left corner.
  2. Select System Preferences.
  3. Type S and click on Sound.
  4. Click on the Input tab.
  5. Drag the Input volume slider all the way to the left.
  6. Close System Preferences.

This works by changing the audio input to the line-in, also known as the audio input port on your Mac. This method works as long as you don’t have any audio input device connected, such as an external microphone or some other line-in device.

Hard Drives on Mac

Older Mac Book Pros have 2.5” hard drives. Video:
The Seagate Thunderbolt Adapter ($99) provides the fastest connection.
The Seagate USB 3.0/2.0 Upgrade Cable costs just $19.99.

Drives in newer 2017 Mac Book Pros have SSD chip cards instead of drives.

Disk Drive Partitions

In Linux File Systems:

Drivers for an MBR (Master Boot Record) Partition Table can handle up to
2TB of disk space per partition. To list partitions:

By design MBR contains space for only 4 primary partitions. One partition can be an extended partition where logical partitions can be defined.

Drivers for a GUID / GPT Partition Table can handle up to
8 Zettabytes (ZB) of disk space per partition.

SCSI devices can have up to 15 partitions.

  1. fdisk only works on MBR.
  2. parted
  3. gdisk

The default partition type is 83 for Linux, 82 for Swap.

  1. Use mkfs to create file systems.

    NOTE: File systems include XFS, ext2, ext3, ext4, ReiserFS, Btrfs (better fs), etc.

    ext is called the “extended file system”.

Disk utilities

  1. Open a Terminal window.

  2. List partitions:

    diskutil list

    It lists physical and virtual disks:

    /dev/disk0
    #:                       TYPE NAME                    SIZE       IDENTIFIER
    0:      GUID_partition_scheme                        *251.0 GB   disk0
    1:                        EFI EFI                     209.7 MB   disk0s1
    2:                  Apple_HFS Mac SSD                 150.0 GB   disk0s2
    3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    4:       Microsoft Basic Data Windows 8               100.1 GB   disk0s4
    /dev/disk1
    #:                       TYPE NAME                    SIZE       IDENTIFIER
    0:     FDisk_partition_scheme                        *500.1 GB   disk1
    1:                  Apple_HFS George Garside          300.2 GB   disk1s1
    2:               Windows_NTFS GRGARSIDE               199.9 GB   disk1s2
    

    "0:" and other such numbers are partitions.

    The command takes the place of the Linux lsblk commmand.

  3. Get information for a specific partition (disk0):

    diskutil info /dev/disk0

    The “Device / Media Name” is the partition label from the disk’s partition map (GPT - GUID Partition Table). disk0 Device Media Name: such as "APPLE SSD SM768E Media" is the make and model of your drive.

    Device / Media Names are set when a partition is created on a disk. The only way you could rename the “startup partition” would be to startup from another drive. The initial name is set by Apple. (which Apple does not expected people to change and does not reference them at the CLI or GUI level).

    AOTW, Apple sells SD drives up to 750.4 GB.

    Notice that disk1 is a Logical Volume on disk0s2 with a GUID referencing disk0.

  4. DOTHIS: In a Terminal window invoke:

    diskutil info /dev/disk0s2

    disk0s1: “EFI system partition”

    contains extended firmware for your drive.

  5. DOTHIS: In a Terminal window invoke:

    diskutil info /dev/disk0s1

    disk0s1: “EFI system partition”
    contains extended firmware for your drive.

    disk0s2: “Customer” to diskutil is where your files are stored.

  6. DOTHIS: In a Terminal window invoke:

    diskutil info /dev/disk1

    appears on the Desktop as "Macintosh HD" system partition, which can be changed by pressing Return key after clicking on it.

    disk0s3: “Recovery HD” is a clean install of the OS to make restoring your computer easier.

    If you add your own custom partition to the mix you will find that Apple’s tools (i.e. Disk Utility) will match the visible name and the device name.

  7. DOTHIS: Plug in a Time Machine drive.
  8. In a Terminal window invoke:

    diskutil info /dev/disk2
    

    In the list it would have 3 partitions:

    0: Apple_partition_scheme
    1: Windows_FAT_32
    2: Apple_HFS

  9. DOTHIS: Plug in a SD card.

  10. In a Terminal window invoke:

    diskutil list
    

    In the list it would have 2 partitions:

    0: FDISK_partition_scheme
    1: Windows_NTFS

  11. In a Terminal window invoke:

    diskutil info /dev/disk3
  12. DOTHIS: Plug in an external drive.
  13. In a Terminal window invoke:

    diskutil list

    In the list it would have 2 partitions:

    0: FDisk_partition_scheme
    1: Windows_NTFS Seagate Backup Plus …

  14. DOTHIS: In a Terminal window invoke:

    diskutil info /dev/disk5

    "Seagate BUP Slim SL Media"

    According to http://osxdaily.com/2014/03/20/mount-ext-linux-file-system-mac/”> http://sourceforge.net/projects/osxfuse/files/osxfuse-2.7.5/osxfuse-2.7.5.dmg/download”> OSX Fuse</p> extend OS X’s native file handling capabilities via third-party file systems such as ext4.

  15. For static information about filesystems:

    fstab
    

Hard Drive Partition Tables

DOTHIS: To show partition tables for a particular disk: In a Terminal window invoke:

sudo get show /dev/disk0

Eject the disk from the Finder (or use the unmount terminal command if you’d like). If you don’t do this, you may get a Resource busy error message during the following step.

CAUTION: Change the partition label as desired:


   sudo gpt label -i 2 -l "My New Partition Label" /dev/rdisk0
   

(replace disk0 with the relevant disk number and replace 2 with the index number.

Disk Space Usage

One of the folks at Sketch (the Mac photo-editing tool) noticed that Daisy Disk didn’t map all the disk space usage.

  1. To reveal disk usage by a file that Apple Lion uses to store copies of files to revert to any version:

    sudo du -sh /.DocumentRevisions-V100
    

    Resetting to zero would involve re-installs.

  2. If you use an alternative backup such as Dropbox, you can turn it off for a particular program:

    defaults write -app ‘sketch’ ApplePersistence -bool no
    
  3. List using a Linux command with the -Human readable flag:

    df -Hl
    

    The response:

    Filesystem                          Size   Used  Avail Capacity iused      ifree %iused  Mounted on
    /dev/disk1                          499G   339G   159G    69% 3373911 4291593368    0%   /
    localhost:/hTrfpXTlOnJhs5cpiEGZpI   499G   499G     0B   100%       0          0  100%   /Volumes/MobileBackups
    

    Alternately, there is a more verbose -human readable flag:

    df -h
    

    The response:

    Filesystem                          Size   Used  Avail Capacity iused      ifree %iused  Mounted on
    /dev/disk1                         465Gi  316Gi  148Gi    69% 3375349 4291591930    0%   /
    devfs                              256Ki  256Ki    0Bi   100%     884          0  100%   /dev
    map -hosts                           0Bi    0Bi    0Bi   100%       0          0  100%   /net
    map auto_home                        0Bi    0Bi    0Bi   100%       0          0  100%   /home
    localhost:/hTrfpXTlOnJhs5cpiEGZpI  465Gi  465Gi    0Bi   100%       0          0  100%   /Volumes/MobileBackups
    kbfs@kbfuse0                        10Gi    0Bi   10Gi     0%       0          0  100%   /keybase
    

    inodes

    Under the iused and ifree columns are the number of inode entries used and free. The total allocated of 4,294,967,279 is fixed at system creation.

Peripherals - Thunderbolt miniports

The squarish holes are thunderbolt ports for devices such as hard drives, monitors, etc. Apple sells adapters for connecting to DVI, HDMI, and VGA monitors as well as LN45 Ethernet.

The MiniDisplay Port is compatible only with Display Port compatible devices, such as an external monitor from Apple.

There are 2 squarish miniports, so you can chain up to 10 thunderbolt devices.

PROTIP: A display that isn’t compatible with Thunderbolt must be the last one in the chain.

Thunderbolt can transfer at speeds up to 20Gbps (higher speeds than USB).

USB drives

BLAH: Apple’s DVD drives don’t play BluRay video DVDs.

To watch BluRay disks, get a Samsung external drive and software.

QUESTION: On Mac OS X, the Xcode developer suite includes the USB Proper.app app found in /Developer/Applications/Utilities/.

To list USB ports, use this Linux command brought to MacOS by https://github.com/jlhonora/lsusb

brew tap jlhonora/lsusb && brew install lsusb
   lsusb
   

An example response for my machine:

Bus 026 Device 001: ID 8087:0024 Intel Corporation Hub 
Bus 026 Device 003: ID 05ac:8510 Apple Inc. FaceTime HD Camera (Built-in)  Serial: CC2F8K0G1JDN9KE0
Bus 029 Device 001: ID 8087:0024 Intel Corporation Hub 
Bus 029 Device 002: ID 0424:2512 SMSC Hub 
Bus 029 Device 004: ID 05ac:0262 Apple Inc. Apple Internal Keyboard / Trackpad 
Bus 029 Device 003: ID 0a5c:4500 Broadcom Corp. BRCM20702 Hub 
Bus 029 Device 005: ID 05ac:8286 Apple Inc. Bluetooth USB Host Controller 
Bus 020 Device 012: ID 045e:0040 Microsoft Corporation Microsoft 3-Button Mouse with IntelliEye(TM) 
Bus 000 Device 001: ID 1d6b:IPCI Linux Foundation USB 2.0 Bus 
Bus 000 Device 001: ID 1d6b:IPCI Linux Foundation USB 2.0 Bus 
Bus 000 Device 001: ID 1d6b:IPPT Linux Foundation USB 3.0 Bus 
   

The above uses the built-in utility /usr/sbin/system_profiler SPHardwareDataType

More on OSX

This is one of a series on Mac OSX: