Terminal commands can sometimes do things much more quickly than finding and adjusting settings in the graphical operating system. Terminal can be found in Applications > Utilities. But the easiest way to open it (or any application not on your dock) is to click Command + Spacebar which opens Spotlight; then type in the first few characters of the application’s name (e.g. “term”).
Before following any of the commands below, be sure your data is backed up. Any command requiring sudo at the beginning is asking for elevated permissions and should be handled with special care. Also note that changes are made between OS versions and not all commands (there are thousands of them and their iterations) are compatible with every version of OS X.
Some tricks in Terminal include typing “clear” (no quotes) to clear everything currently on the screen. It’s especially useful in scripts, and you can usually break (stop) running processes by either typing Control-C or Control-Z.
Showing hidden files can be useful for troubleshooting or looking for hidden Library files that need to be deleted to reset preferences for a troubled application. Note that they are hidden for a reason; if others access a computer the hidden files should be re-enabled when you are finished.
defaults write com.apple.finder AppleShowAllFiles TRUE
Change the default format for screen shots from .png to .jpg or .pdf if you prefer.
defaults write com.apple.screencapture type file-extension
Replace “file-extension” with the three letter abbreviation of your desired file format, e.g. jpg or pdf.
Show drive labels for all mounted volumes even if they are not showing up in Finder or Disk Utility. This is useful if you have a CD/DVD, thumb drive or external drive that isn’t showing up Finder; you can at least see if the computer is recognizing the device on some level.
diskutil list
For more really useful options for diskutil, type “man diskutil” at the prompt and you can scroll through all the options. You can use “man” with any command to view all options for that command, it stands for manual pages.
Add a “Recent Applications” icon to your dock for apps that you may use but aren’t necessarily on your dock. It’s a convenient way to clean up your dock.
defaults write com.apple.dock persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }’; killall Dock
For laptops and a little extra security, you can add your name and phone number as contacts if it’s found; for businesses you can add a message regarding your logon or security policies:
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText “Hi, I am Mac”
To undo it type:
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText “”
Again, always be sure that your data is backed up. There are many useful Terminal commands, to explore them just Google something like, “Mac useful Terminal commands.” Before long, you could be a script wizard!