12 Cool Terminal Commands for OSX

Your rating: None Average: 3.9 (31 votes)

Here are a list of cool OSX Terminal commands we came across and found worth sharing. Just run the commands in your and see what happens...

1. Add An Exposè Button To The Desktop

If you have reconfigured the F9 and F10 keys to something different you may want to use exposè. This hack adds a bigish blue button onto the desktop to enable you to use exposè. Clicking on it shows all the windows from one application (F10 default), option clicking it shows all windows (F9 default).

defaults write wvous-floater -bool YES
killall Dock

2. Enable Double Scroll Arrows

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

defaults write “Apple Global Domain” AppleScrollBarVariant DoubleBoth

3. Create recent-item stacks

Make sure the above is pasted as a single line. On restarting the Dock, you'll see a stack next to Trash. Click-hold and you can set it to show recent apps, documents or servers, or 'favorite' volumes or items. Run the command again for further instances that can be set to different display options.

defaults write persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'


4. Add Spaces to Your Dock

If you are constantly mis-clicking and launching the wrong application (xchat instead of terminal, since they have similar icons...), adding spacers into your dock to visually separate the icons can be a big help. By adding spaces, you can group related icons together for ease of use, but have just enough of a visual difference to prevent you from spastically clicking on the wrong ones.

defaults write persistent-apps -array-add '{"tile-type"="spacer-tile";}'

When your dock restarts, you’ll see a spacer in the right-side. You can click and drag this spacer to wherever you need, and you can re-run that command in your Terminal window to create as many spacers as you want. And just like any other dock icon, you can right+click and remove, or just drag it off the dock to get rid of it.Remember to type killall Dock to restart your dock before the changes will take effect.


5. Drag widgets to the desktop

This command activates developer mode for Dashboard. Once it's active, click-hold a widget and close Dashboard. The widget will stay put, floating above other windows. To put it back, click-hold, open Dashboard and 'drop' the widget. 

defaults write devmode yes

6. Make Screen Saver as Desktop Background

This will make your desktop background as your initial screen saver. After you've entered that one line of command, Terminal will you the process ID. For example, [1] 478, which 478 is the process ID.

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

As shown in example above, the process ID is 478. Therefore, in order to stop using screen saver as desktop wallpaper, the above one line of command is used. Note : 478 is the process ID.

Here is the easiest way to end this : Quitting Terminal.

7. Gradient Behind A Stack Item

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

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

8. Re-Index Spotlight to Fix WonkyResults

If your Spotlights results don’t seem to add up, try these two commands to re-index the drive.

sudo mdutil -E /
sudo mdutil -i on /

9. Make your Mac talk 

Replace '[string]' with some words to make your Mac talk.

say [string]

10. Show Hidden Files

This shows hidden files in Finder. Take care to not trash something you shouldn't. Replace 'true' with 'false' to put things back to normal.

defaults write AppleShowAllFiles true

11. 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

12. Enable The Path View In Finder

Lets you see the current path of the Finder window.

defaults write _FXShowPosixPathInTitle -bool YES

Trackback URL for this post: