Top 15 Terminal Commands

You'll find the Terminal in the Utilities folder within the Applications folder. To carry out any of the following commands you will need to copy/paste or type in the line of text then hit enter. For the most part, applications will need restarting before changes take place. For most applications you can just quit and open them again, but for the Finder and the Dock it is easiest to just type “killall Finder” or “killall Dock” into Terminal after the command.

To reverse any of them, just repeat the command with NO at the end instead of YES, or vice versa.

1. Make hidden applications' dock icons translucent.


defaults write com.apple.Dock showhidden -bool YES
 



2. Normally the arrows next to artists and albums in your iTunes library search the iTunes store when you click them. 
This command changes them so that clicking will search your iTunes library instead.

defaults write com.apple.iTunes invertStoreLinks -bool YES



3. This allows you to drag widgets out of Dashboard onto the desktop. 
Requires the dock to be relaunched to take effect, so type "killall Dock" and press enter. Now, if you click and hold onto a widget in the dashboard and press F12 to return to the desktop, the widget won't disappear with the rest.

defaults write com.apple.dashboard devmode YES
 
 



4. Force all mail to be displayed as plain text.

defaults write com.apple.mail PreferPlainText -bool YES



5. Set expanded save dialogs as default 
(showing column/list view of folders rather than a drop down menu). Replace TRUE with FALSE to reverse.

defaults write -g NSNavPanelExpandedStateForSaveMode -bool YES



6. Display the currently chosen screen saver to be shown as the desktop background. 
Press Control-C or Command-. to stop.

/System/Library/Frameworks/ScreenSaver.framework/Resources/ ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background



7. Display useful system stats in the login window. 

defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo SystemVersion 

Replace "SystemVersion" with one of the following for different stats:

SystemBuild 
SerialNumber
IPAddress
DSStatus
Time
HostName



8. To remove accounts from the login window 
Type this command with the short name of each account you wish to remove.

sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add shortname1 shortname2 shortname3



9. Skip disk image verification. Potentially risky, use with disk images from trusted sources.

defaults write com.apple.frameworks.diskimages skip-verify -bool YES



10. Put double scroll arrows at both ends of scroll bar. 
Use Appearance pane in system preferences to reset.

defaults write "Apple Global Domain" AppleScrollBarVariant DoubleBoth
 
 


11. Disable the unexpectedly quit dialog that normally appears when an application crashes.
Replace "none" with "prompt" to enable again.

defaults write com.apple.CrashReporter DialogType none



12. Set the history limit in Safari to a certain number of items and and/or a certain age.
 
defaults write com.apple.Safari WebKitHistoryItemLimit 2000
 
and/or

defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30



13. Show hidden files in the Finder.

defaults write com.apple.finder AppleShowAllFiles -bool YES



14. Enable the debug menu in Safari.

defaults write com.apple.safari IncludeDebugMenu -bool YES


15. Deactivate Dashboard. 
Requires the dock to be relaunched to take effect, so type "killall Dock" and press enter.

defaults write com.apple.dashboard mcx-disabled -bool YES