Command Line Hacks - Mac Tips, Tricks & Shortcuts in easy steps (2015)

Mac Tips, Tricks & Shortcuts in easy steps (2015)


Command Line Hacks

Using UNIX commands may seem slightly arcane but there are many modifications you can make to OS X using the Command Line. In this section we will look at some Finder- and app-specific hacks you can make to your Mac.

Using Terminal commands

There are lots of apps that let you tinker under the hood with OS X, switching off and on various features. You can modify many aspects of the Mac using a Utility called Terminal (found in your Utilities folder). It allows you to type UNIX commands to the Mac. Unfortunately, Terminal is not a very user-friendly app and you have to be sure of what you are doing if you enter such commands. A wrong command can render your Mac useless, so try these out with caution!


Some of the commands are very useful, e.g. converting Apple Mail-copied email addresses into a more useful form, and others control the behavior of the Finder or other graphical features.

For many of these hacks, if you wish to return your Mac to normal, replace true in the command with false, YES with NO, and 1 with 0.

Many of the commands in the book wrap across two or more lines but when entering them in Terminal keep them on one line.


For many of these, you will need to log out and back in to your account to enable the changes.


There are many websites offering UNIX hacks for you to play with.


Finder Hacks

Change Dock delay time

This changes the time before the Dock appears when you hover the mouse over it.

defaults write autohide-delay-float 0


Add a gradient behind a stack item

This enables you to put a small gradient behind an icon.

defaults write mouse-over-hilte-stack -boolean YES

killall Dock

Add a message to the Login window

This Terminal command enables you to add a message of your choice to the Login window. Sudo commands can be dangerous so use with care!

sudo defaults write /Library/Preferences/ LoginwindowText “Your Message”

Replace “Your Message” with the message of your choice - don’t make it too long. To revert back to the default, type the following code:

sudo defaults write /Library/Preferences/ LoginwindowText “”

Increase Dock magnification size

This hack lets you increase the size of the magnification of the Dock icons. Do not go higher than 512.

defaults write largesize -int 512

Increase Desktop icon size

If you want massive icons on your Desktop, this hack lets you increase the icons to 512 pixels x 512 pixels. This may slow down older machines.

defaults write DesktopViewOptions-dict IconSize -integer 512

killall Finder

Changing the format of Screenshots

You can change the default screenshot format to JPEG, TIFF, PNG, BMP, or GIF. You need to log out and back in again, or restart for the changes to take effect.

defaults write type jpg

Change the Login picture

If you get bored with the Login screen, you can change it with this bit of code. Change the file location in the second half of the string to the exact file location of your chosen picture.

defaults write /Library/Preferences/ DesktopPicture “/System/Library/ CoreServices/”


Many of these hacks are available using apps, e.g. TinkerTool and several others.

Clear the Open With menu

If you right-click on a file you can open it with many applications. Sometimes your OS can get a little confused and list many applications. This hack clears this list and lets you start again.

/System/Library/Frameworks/CoreServices. framework/Versions/A/Frameworks/


-kill -r -domain local -domain system -domain user

Window drag speed

This hack changes the time delay it takes to drag windows around in spaces; it’s currently set to 0.75.

defaults write workspaces-edge-delay -float 0.5

Disable Dashboard

If you don’t want or like the dashboard running, you can disable it. Change YES to NO to enable it again.

defaults write mcx-disabled-boolean YES

killall Dock

Enable Double Scroll Arrows

This hack enables the double arrow set for up and down, left or right, to be at both ends of the scroll bar. Use System Preferences to reset.

defaults write “Apple Global Domain” AppleScrollBarVariant DoubleBoth

Increase the Dock size

This command enables you to change the size of the Dock. Use the sliders in System Preferences to reduce this size. Don’t go larger than 256.

defaults write tilesize -int 256

Disable the Crash Dialog box

This disables the Quit Dialog box when an application crashes. Type “prompt” to enable it again.

defaults write DialogType none

Drag a Widget onto the Desktop

This is a great hack, since it enables widgets to be placed onto the Desktop. Drag a widget around and press F12 to drag it onto the Desktop. Repeat the process again to drag a widget back onto the dashboard. You may need to log off or restart for it to take effect.

defaults write devmode YES

List all open files


Eject a CD…

CDs and DVDs can get stuck. This hack helps you eject the disk (disc). Note: it may not always be Disk 1.

diskutil eject disk1

Count number of lines in the text in the Clipboard

pbpaste | wc -l

Count number of words in the text in the Clipboard

pbpaste | wc -w

Sort lines of text in the Clipboard and copy back to the Clipboard

pbpaste | sort | pbcopy

Reverse each line of text in the Clipboard

Makes each line appear backwards, and copies them back to the Clipboard.

pbpaste | rev | pbcopy

Strip duplicate lines from text in the Clipboard

pbpaste | sort | uniq | pbcopy

pbpaste | sort | uniq -d | pbcopy

pbpaste | sort | uniq -u | pbcopy

Tidy up HTML in the Clipboard and copy it back to the Clipboard

pbpaste | tidy | pbcopy

Display the first five lines from the Clipboard

pbpaste | head -n 5

Display the last five lines from the Clipboard

pbpaste | tail -n 5

Convert tabs to spaces for the lines in the Clipboard

pbpaste | expand | pbcopy

Display a history of commands used in the terminal by the current user


Convert a file to HTML

textutil -convert html file.extension

Nano (text editor)

For quick changes to text files.

nano [file_to_edit]

Use Control + O to Save and Control + X to quit.


Key repeat rate

You can re-enable the repeat key presses (off by default) with this Terminal command.

defaults write -g ApplePressAndHoldEnabled -bool false

To reverse, replace the “false” at the end with a “true”.

Disable Yosemite’s window animations

defaults write NSGlobalDomain
NSAutomaticWindowAnimationsEnabled -bool false

To reverse, replace “false” in the above command with “true”.

Enable AirDrop on unsupported Macs and over Ethernet

AirDrop will only work with newer Macs and over Wi-Fi. If you wish to enable this feature on some older systems and over Ethernet, use this hack.

defaults write
BrowseAllInterfaces -bool true

To return your Mac to normal, replace “true” in the above command with “false”.

Disable Smooth Scrolling

Use this hack to switch off smooth scrolling and return OS X to its pre-Smooth Scrolling functionality.

defaults write -g NSScrollAnimationEnabled -bool NO

To enable Smooth Scrolling again, replace the “NO” in the above statement with “YES”.

Disable Rubber Band Effect

defaults write -g NSScrollViewRubberbanding -int 0

This does not work for every app. You will need to restart apps on an app-by-app basis to see the change. Replace “0” in the above command with a “1” to re-enable the rubber band effect.

Check which Processes are using the Internet

lsof -P -i -n | cut -f 1 -d “ “ | uniq

Menu bar: disable Transparency

defaults write NSGlobalDomain
AppleEnableMenuBarTransparency -bool false

Menu bar: show remaining Battery Time; hide percentage

defaults write
ShowPercent -string “NO”

defaults write
ShowTime -string “YES”

Menu bar: hide the Time Machine and Volume icons

defaults write menuExtras -array “/System/Library/CoreServices/ Menu Extras/” “/System/Library/ CoreServices/Menu Extras/” “/System/ Library/CoreServices/Menu Extras/” “/ System/Library/CoreServices/Menu Extras/Clock. menu”

Always show Scroll bars

defaults write NSGlobalDomain AppleShowScrollBars-string “Always”

Disable opening and closing window animations

defaults write NSGlobalDomain
NSAutomaticWindowAnimationsEnabled -bool false

Increase window resize speed for Cocoa applications

defaults write NSGlobalDomain NSWindowResizeTime-float 0.001

Expand Save panel by default

defaults write NSGlobalDomain
NSNavPanelExpandedStateForSaveMode -bool true

Expand Print panel by default

defaults write NSGlobalDomain
PMPrintingExpandedStateForPrint -bool true

Disable the “Are you sure you want to open this application?” dialog

defaults write
LSQuarantine -bool false

Display ASCII control characters using caret notation in standard text views

defaults write NSGlobalDomain
NSTextShowsControlCharacters -bool true

Disable Resume system-wide

defaults write NSGlobalDomain
NSQuitAlwaysKeepsWindows -bool false

Disable Automatic Termination of Inactive Apps

defaults write NSGlobalDomain
NSDisableAutomaticTermination -bool true

Trackpad: enable tap to Click for this user and for the Login screen

defaults write
AppleBluetoothMultitouch.trackpad Clicking -bool true

defaults -currentHost write NSGlobalDomain com. apple.mouse.tapBehavior -int 1

defaults write NSGlobalDomain tapBehavior -int 1

Trackpad: map bottom right corner to right-click

defaults write
TrackpadCornerSecondaryClick -int 2

defaults write
TrackpadRightClick -bool true

defaults -currentHost write NSGlobalDomain com.
apple.trackpad.trackpadCornerClickBehavior -int 1

defaults -currentHost write NSGlobalDomain com.
apple.trackpad.enableSecondaryClick -bool true

Trackpad: swipe between pages with three fingers

defaults write NSGlobalDomain
AppleEnableSwipeNavigateWithScrolls -bool true

defaults -currentHost write NSGlobalDomain com.
apple.trackpad.threeFingerHorizSwipeGesture -int 1

defaults write
TrackpadThreeFingerHorizSwipeGesture -int 1

Disable “natural” scrolling

Some people like this but it’s the first thing I switch off. It feels anything but natural!

defaults write NSGlobalDomain
swipescrolldirection -bool false

Increase sound quality for Bluetooth headphones/headsets

defaults write
“Apple Bitpool Min (editable)” -int 40

Enable full keyboard access for all controls

defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

Disable press-and-hold for keys in favor of key repeat

defaults write NSGlobalDomain
ApplePressAndHoldEnabled -bool false

Set a fast keyboard repeat rate

defaults write NSGlobalDomain KeyRepeat -int 0

Set language and text formats

If you are in the US, replace “EUR” with “USD”, “Centimeters” with “Inches”, and “true” with “false”.

defaults write NSGlobalDomain AppleLanguages -array “en” “nl”

defaults write NSGlobalDomain AppleLocale -string “en_GB@currency=EUR”

defaults write NSGlobalDomain
AppleMeasurementUnits -string “Centimeters”

defaults write NSGlobalDomain AppleMetricUnits -bool true

Disable Auto-correct

defaults write NSGlobalDomain
NSAutomaticSpellingCorrectionEnabled -bool false

Kill a Process

Sometimes you just need a process to stop running. If you want to kill it in Terminal without using Activity Monitor, find the process ID (in Activity Monitor) and then use the following command.

kill PID 478

Let Terminal Talk

You can get Terminal to speak anything back to you using the voice engine. Replace “hello” with anything you want.

say hello

Make Hidden Applications' icons transparent

If you hide a lot of applications, you can make their icons transparent in the dock.

defaults write showhidden -bool

killall Dock

Make the Dock spring-loaded

Makes the dock spring-loaded so you can open files or windows from within the dock.

defaults write enable-spring-load-actions- on-all-items -boolean YES

Recent Applications Stack

This command creates a new stack in your dock so you can view the recently-used Applications.

defaults write persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }’

Pin Dock to the right

defaults write pinning -string

Pin Dock to the left

defaults write pinning -string

Pin Dock to the center (back to the way it was)

defaults write pinning -string

Quick Look a file

This command lets you Quick Look a file in Terminal. First, you need to change the folder by using the “cd” command and then enter the folder you want. To enable this command to work you need to type the file name exactly.

qlmanage -p “Jaguar Aqua Graphite.jpg”

Disable the Spotlight icon

This command removes the Spotlight icon. Type 755 to re-enable it, instead of 0.

sudo chmod 0 /System/Library/CoreServices/

killall Spotlight

Remove the stripes in List View

A simple hack that removes the alternating stripes in List View in Finder.

defaults write FXListViewStripes -bool FALSE

killall Finder

Change the Menu Bar to white

If you don’t like the transparent menu bar you can change it so that it appears white. This requires a password and you will need to restart your Mac.

sudo defaults write /System/Library/
‘EnvironmentVariables’ -dict ‘CI_NO_BACKGROUND_ IMAGE’ 1

Change the Menu Bar to gray

If you don’t like the white version of the menu bar you can change it so that it appears gray.

sudo defaults write /System/Library/
‘EnvironmentVariables’ -dict ‘CI_NO_BACKGROUND_ IMAGE’ 0

Revert the Menu Bar back to default

If you prefer the transparent menu bar and you want it back, type the following into Terminal.

sudo defaults delete /System/Library/

Set the expanded Print dialog as default

If you want access to a lot of the extra print menus by default you can use the following command to enable you to do this. Requires a restart.

defaults write -g PMPrintingExpandedStateForPrint -bool TRUE

Set the expanded Save dialog as default

Similar to the print dialog, this sets the save dialog to the expanded view by default. This requires a restart.

defaults write -g
NSNavPanelExpandedStateForSaveMode -bool TRUE

Set the Screen saver as the wallpaper

This command sets the currently-selected screen saver as the Desktop background.

/System/Library/Frameworks/ScreenSaver.framework/Resources/ -background

Show Hidden Files in Finder

A lot of the files in Finder are hidden. If you want to take a look at how many there are and what they are, you can show them within Finder. Be careful, as these files are needed by the system.

Repeat the command with “false” to revert.

defaults write AppleShowAllFiles

Skip Disk Image verification

If you want to save some time you can skip the disk image verification for a disk image. skip-verify TRUE

Show Sub-folders in graphical format in Terminal

This is a very cool hack that enables you to show an ASCII graphical view of sub-folders. Use the cd command to change to a directory, otherwise the command will list every folder.

ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-] [^\/]*\//--/g’ -e ‘s/^/ /’ -e ‘s/-/|/’

Speed up Dialog boxes

Most dialog boxes have an animation effect that looks cool. If you want to speed this up you can change the speed at which it renders so it appears almost instantly. The default is 0.2.

defaults write NSGlobalDomain NSWindowResizeTime

Restart Mac OS X

shutdown - r now

Shutdown Mac OS X

shutdown now

Get overview of current Power Management Settings

pmset -g

Put Display to sleep after 15 minutes of inactivity

sudo pmset displaysleep 15

Put Computer to sleep after 30 minutes of inactivity

sudo pmset sleep 30

Permanently disable Dock icon bouncing

$ defaults write no-bouncing -bool TRUE

$ killall Dock

Disable Dashboard (don’t forget to drag the Dashboard Dock icon off the Dock too)

defaults write mcx-disabled -boolean YES

killall Dock

Enable Dashboard

defaults write mcx-disabled -boolean NO

killall Dock

Force the Finder to show hidden files

This is useful for Web Developers who need to edit .htaccess files, for example.

defaults write AppleShowAllFiles TRUE

Force the Finder to hide hidden files

Require password immediately after sleep or screen saver begins.

defaults write askForPassword -int 1

defaults write askForPasswordDelay -int 0

Save Screenshots to the Desktop

defaults write location -string “$HOME/Desktop”

Disable shadow in Screenshots

defaults write disable-shadow -bool true

Enable subpixel font rendering on non-Apple LCDs

defaults write NSGlobalDomain AppleFontSmoothing -int 2

Finder: allow quitting via ⌘ + Q; doing so will also hide Desktop icons

defaults write QuitMenuItem -bool true

Finder: disable window animations and Get Info animations

defaults write
DisableAllAnimations -bool true

Show icons for hard drives, servers, and removable media on the Desktop

defaults write
ShowExternalHardDrivesOnDesktop -bool true

defaults write
ShowHardDrivesOnDesktop -bool true

defaults write
ShowMountedServersOnDesktop -bool true

defaults write
ShowRemovableMediaOnDesktop -bool true

Finder: show hidden files by default

defaults write AppleShowAllFiles -bool true

Finder: show all filename extensions

defaults write NSGlobalDomain
AppleShowAllExtensions -bool true

Finder: show Status Bar

defaults write ShowStatusBar -bool true

Finder: allow text selection in Quick Look

defaults write
QLEnableTextSelection -bool true

Display full POSIX path as Finder window title

defaults write
FXShowPosixPathInTitle -bool true

Disable the warning when changing a file extension

defaults write
FXEnableExtensionChangeWarning -bool false

Avoid creating .DS_Store files on network volumes

defaults write
DSDontWriteNetworkStores -bool true

Automatically open a new Finder window when a volume is mounted

defaults write auto-open-ro-root -bool true

defaults write auto-open-rw-root -bool true

defaults write
OpenWindowForNewRemovableDisk -bool true

Show item info below icons on the Desktop and in other icon views

/usr/libexec/PlistBuddy -c “Set :DesktopViewSettings:IconViewSettings:showItemInfo true” ~/ Library/Preferences/

/usr/libexec/PlistBuddy -c “Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true” ~/ Library/Preferences/

/usr/libexec/PlistBuddy -c “Set :StandardViewSettings:IconViewSettings:showItemInfo true” ~/ Library/Preferences/

Enable snap-to-grid for icons on the Desktop and in other icon views

/usr/libexec/PlistBuddy -c “Set :DesktopViewSettings:IconViewSettings:arrangeBy grid” ~/Library/ Preferences/

/usr/libexec/PlistBuddy -c “Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid” ~/ Library/Preferences/

/usr/libexec/PlistBuddy -c “Set :StandardViewSettings:IconViewSettings:arrangeBy grid” ~/Library/ Preferences/

Increase grid spacing for icons on the Desktop and in other icon views

/usr/libexec/PlistBuddy -c “Set :DesktopViewSettings:IconViewSettings:gridSpacing 100” ~/Library/ Preferences/

/usr/libexec/PlistBuddy -c “Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100” ~/ Library/Preferences/

/usr/libexec/PlistBuddy -c “Set :StandardViewSettings:IconViewSettings:gridSpacing 100” ~/Library/ Preferences/

Increase the size of icons on the Desktop and in other icon views

/usr/libexec/PlistBuddy -c “Set :DesktopViewSettings:IconViewSettings:iconSize 80” ~/Library/ Preferences/

/usr/libexec/PlistBuddy -c “Set :FK_StandardViewSettings:IconViewSettings:iconSize 80” ~/Library/ Preferences/

/usr/libexec/PlistBuddy -c “Set :StandardViewSettings:IconViewSettings:iconSize 80” ~/Library/ Preferences/

Disable the warning before emptying the Trash

defaults write WarnOnEmptyTrash -bool false

Empty Trash securely by default

defaults write EmptyTrashSecurely -bool true

Show the ~/Library folder

chflags nohidden ~/Library

Remove Dropbox’s green checkmark icons in Finder

file=/Applications/ check.icns

[ -e “$file” ] && mv -f “$file” “$file.bak”

unset file

Enable highlight hover effect for the grid view of a stack (Dock)

defaults write mouse-over-hilte-stack -bool true

Set the icon size of Dock items to 36 pixels

defaults write tilesize -int 36

Enable spring-loading for all Dock items

defaults write enable-spring-load-actions-on-all-items -bool true

Show indicator lights for open applications in the Dock

defaults write show-process-indicators -bool true

Don’t animate opening applications from the Dock

defaults write launchanim -bool false

Speed up Mission Control animations

defaults write expose-animation-
duration -float 0.1

Top left screen corner → Mission Control

defaults write wvous-tl-corner
-int 2

defaults write wvous-tl-modifier
-int 0

Top right screen corner → Desktop

defaults write wvous-tr-corner
-int 4

defaults write wvous-tr-modifier
-int 0

Bottom left screen corner → Start Screen saver

defaults write wvous-bl-corner
-int 5

defaults write wvous-bl-modifier
-int 0

Remove the auto-hiding Dock delay

defaults write autohide-delay
-float 0

Remove the animation when hiding/showing the Dock

defaults write autohide-time-
modifier -float 0

#defaults write no-glass -bool true

Automatically hide and show the Dock

defaults write autohide -bool true

Make Dock icons of hidden applications translucent

defaults write showhidden -bool true

Reset Launchpad

find ~/Library/Application\ Support/Dock -name “*.db” -maxdepth 1 -delete

Add a spacer to the left side of the Dock (where the applications are)

#defaults write persistent-apps -array-add ‘{tile-data={}; tile-type=”spacer-tile”;}’

Add a spacer to the right side of the Dock (where the Trash is)

#defaults write persistent-others -array-add ‘{tile-data={}; tile-type=”spacer-tile”;}’

Add a context menu item for showing the Web Inspector in web views

defaults write NSGlobalDomain
WebKitDeveloperExtras -bool true

Enable Dashboard dev mode (allows keeping widgets on the Desktop)

defaults write devmode -bool true

Disable smart quotes as it’s annoying for code Tweets

defaults write com.twitter.twitter-mac
AutomaticQuoteSubstitutionEnabled -bool false

Show the app window when clicking the menu icon

defaults write com.twitter.twitter-mac
MenuItemBehavior -int 1

Enable the hidden “Develop” menu

defaults write com.twitter.twitter-mac
ShowDevelopMenu -bool true

Hide the app in the background if it’s not the frontmost window

This is a very useful command for anyone who does a lot of fiddling and needs to quit Finder.

defaults write QuitMenuItem -bool YES

killall Finder

App-specific Commands

Web inspector for Safari

This is a very detailed web inspector that enables you to find out specific information about a page. It is accessible through the debug menu but this enables you to use it without. You can access it quickly through right-click.

defaults write
WebKitDeveloperExtras -bool true

See current path of Finder window

defaults write _
FXShowPosixPathInTitle -bool YES

Enable Time Machine on unsupported drives

This hack enables Time Machine to work on unsupported drives such as a NAS. Use with caution as it is unsupported.

defaults write
TMShowUnsupportedNetworkVolumes 1

Increase Time Machine backups

To change to half-hourly backups use this hack.

sudo defaults write /System/Library/
StartInterval -int 1800

Enable the debug menu in iCal

defaults write IncludeDebugMenu -bool true

hash tmutil &> /dev/null && sudo tmutil disablelocal

Force Mail to display in plain text

defaults write PreferPlainText -bool TRUE

Disable Tooltips in Safari

This quick hack for Safari removes the tooltips you get when you hover over certain elements.

defaults write
WebKitShowsURLsInToolTips 0

Change the loading bar in Safari to a pie chart

This changes the blue bar that goes across the address bar into a small blue pie chart. Insert “false” instead of “true” to reverse.

defaults write
DebugUsePieProgressIndicator -bool true

Enable debug menu in Safari

Adding debug menus to programs is great, as you can access a whole range of features. This one is for Safari.

defaults write IncludeDebugMenu 1

Set the history limit in Safari to a number of items

defaults write
WebKitHistoryItemLimit 2000

Set the history limit in Safari to a number of days

defaults write
WebKitHistoryAgeInDaysLimit 30

Disable Safari’s thumbnail cache for history and top sites

defaults write
DebugSnapshotsUpdatePolicy -int 2

defaults write
IncludeInternalDebugMenu -bool true

Make Safari’s search banners default to “contains” instead of “starts with”

defaults write
FindOnPageMatchesWordStartsOnly -bool false

Remove unwanted icons from Safari’s bookmarks bar

defaults write
ProxiesInBookmarksBar “()”

Change the arrows in iTunes

Normally the arrows in iTunes link to the music store. Adding this command enables you to search your library. You need to click on the song first for the arrows to appear.

defaults write invertStoreLinks -bool YES

Change iTunes link behavior to point at local iTunes Library instead of iTunes Store

defaults write invertStoreLinks -bool true

defaults write invertStoreLinks -bool YES

Disable the iTunes arrow links completely

defaults write show-store-arrow-links -bool false

Enable iTunes track notifications in the Dock

defaults write itunes-notifications -bool true

Make ⌘ + F focus the search input in iTunes

defaults write
NSUserKeyEquivalents -dict-add “Target Search Field” “@F”

Sync to Dropbox from anywhere in your home folder

Using this Terminal command you can create symbolic links to folders you want to sync within Dropbox.

(replace username, foldername, and path/to/
dropbox with your own values):

ln -s /Users/username/Documents/foldername / Users/path/to/dropbox/Files/

Disable send and reply animations in

defaults write
DisableReplyAnimations -bool true

defaults write
DisableSendAnimations -bool true

Copy email addresses as “” instead of John Doe <> in

defaults write
AddressesIncludeNameOnPasteboard -bool false

Enable the debug menu in Disk Utility

defaults write
DUDebugMenuEnabled -bool true

Prevent Time Machine from prompting to use new hard drives as backup volume

defaults write
DoNotOfferNewDisksForBackup -bool true

Enable the debug menu in Address Book

defaults write
ABShowDebugMenu -bool true


Play Star Wars Episode IV

Using a simple Telnet address your Terminal will connect in and play Star Wars Episode IV in ASCII format!



Tetris and Pong

Open Terminal, type


Click Enter

Press ESC + X at the same time







Use the arrow keys to move and rotate the blocks, and press the space to make the blocks fall.

Networking and Internet

Ping a host to see whether it’s available

ping -o

Troubleshoot routing problems to a host using traceroute


Check whether a host is running an HTTP server (i.e. check that a website is available)

curl -I | head -n 1

Who is logged in to your Mac?



Show routing table

netstat -r

Show active network connections

netstat -an

Show network statistics

netstat -s

Restart Bonjour

Useful when a Mac "disappears" from the Network.

sudo launchctl unload /System/Library/LaunchDaemons/

sudo launchctl load /System/Library/LaunchDaemons/