Top 50 Terminal Commands 132

Terminal

Share
Top 50 Terminal Commands

Hey

Terminal is Mac OS X way into the command line world. It is designed for you to typing in specific commands that you would not be able to do otherwise. This is great for customizing your Mac and unveiling hidden features. It is also a good way to destroy you system because you screwed something up.

What I have done is crawl the web look of the Top 50 Terminal commands. These commands are designed to make you make look cooler, act quicker or be generally useful. I have tried to keep commands down to one line, so they are simple and effective to use. Each item will include a description of what it does as well as an appropriate picture is necessary. Many of these commands appear as seperate posts all over the web, but never in one big list. I have tried to keep the amount of sudo commands down to a minimum as this can easily destroy your system. Especially if you go sudoing every thing. I have tried to give the best description I can, if you have a problem leave a comment and I will see if I can solve it. The list is in no particular order. Most of the commands can be reverted by replacing YES with NO and 1 with 0, the opposite. Most of these commands are Leopard compatible and many may not work on Tiger. Try them and see what happens.

1) 2D Dock


This quite a popular hack for the people running Leopard and don’t like the 3D feel. It changes the 3D dock to a flat 2D version. To enter copy and past the following code.

defaults write com.apple.dock no-glass -boolean YES
killall Dock

2) Gradient Behind A Stack Item


One of my favourite hacks that enables you to put a small gradient behind an icon. I think this should be enabled by default.

defaults write com.apple.dock mouse-over-hilte-stack -boolean YES
killall Dock

3) Add A Message To The Login Window

This little Terminal command enables you to add a message of your choice to the Login window. Pretty cool and deserved a screenshot if I new how to take on while not logged in. Warning it’s a sudo command which can be dangerous.

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Your Message"

Replace “Your Message” with the message of your choice, don’t make it to long. If you want to revert it do the following.

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText ""

4) 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 com.apple.dock wvous-floater -bool YES
killall Dock

5) Address Book Debug Menu

If you have some trouble with Address Book it may be useful to open up the debug menu as well as this use some of the hidden features. Make sure address book is closed first before applying the code. If you want to revert it remove YES in the string.


defaults write com.apple.addressbook ABShowDebugMenu -bool YES

6) Increase Dock Magnification Size

This little hack lets you increase the size of the magnification of the dock icons. Don’t go past 512.

defaults write com.apple.dock largesize -int 512

7) Increase Desktop Icon Size

If you want massive icons on you desktop this little hack lets you increase the icons to 512 pixels x 512 pixels. This is massive, may slow down on older machines. I don’t think it goes larger than 512.

defaults write com.apple.finder DesktopViewOptions -dict IconSize -integer 512
killall Finder

8) Changing the Format Of Screen Shots

If you use the screen shot function, you may want to change the format of the images, this is not easily done normally. Where jpg is in the code you can change this to the format your want, png bmp gif etc. You need to log out and back in again, or restart for the changes to take effect.

defaults write com.apple.screencapture type jpg

9) Change The Login Picture

If you get a bored of the space picture used on the login screen, you can change it with this little 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/com.apple.loginwindow DesktopPicture "/System/Library/CoreServices/Finder.app/Contents/Resources/vortex.png"

10) Change The Loading Bar In Safari To A Pie Chart


This is a Safari 3 hack, so it might not work. 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 com.apple.Safari DebugUsePieProgressIndicator -bool true

11) 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 is to clear this list and start again. The code below is all on one line.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/
LaunchServices.framework/Versions/A/Support/lsregister
-kill -r -domain local -domain system -domain user

12) Change The Delay When Dragging Windows In Spaces

This simple hack changes the delay time it takes to drag windows around in spaces, its currently set to 0.75

defaults write com.apple.dock workspaces-edge-delay -float 0.5

13) 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 com.apple.dashboard mcx-disabled -boolean YES
killall Dock

14) 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

15) Disable Tooltips In Safari

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

defaults write com.apple.Safari WebKitShowsURLsInToolTips 0

16) Increase The Dock Size

Command #6 enables you to change the magnification. 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 256.

defaults write com.apple.dock tilesize -int 256

17) Disable the Crash Dialog Box

This disables the quit dialog box when an application crashes. Type prompt to enable again.

defaults write com.apple.CrashReporter DialogType none

18) Drag A Widget Onto The Desktop


Probably one of the coolest hacks. This command 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. This may need you to log off or restart for it to take effect.

defaults write com.apple.dashboard devmode YES

19) 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 com.apple.Safari IncludeDebugMenu 1

20) Enable The Path View In Finder


One of may favourite hacks as it lets you see the current path of the Finder window you are in. Its great if you work with a lot of windows.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

21) Enable Time Machine On Unsupported Drives


Another favourite hack of mine, simply because it enable Time Machine to work on unsupported drives such as a NAS. Use with caution as it is unsupported.

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

22) Enable Web Inspector


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 quickly access it through right-click.

defaults write com.apple.Safari WebKitDeveloperExtras -bool true

23) Enable Debug in iCal

Another debug menu (I like debug menus) this time its for iCal. You need to restart iCal for the changes to take effect.

defaults write com.apple.iCal IncludeDebugMenu YES

24) Enable Quit In Finder


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

defaults write com.apple.finder QuitMenuItem -bool YES
killall Finder

25) Force Mail To Display In Plain Text

If you have problems with HTML emails or you just want emails to be displayed in plain text use the following command. You need to restart Mail for the changes to take effect. Replace with false to revert.

defaults write com.apple.mail PreferPlainText -bool TRUE

26) Increase Time Machine Backups

If you do a lot of work on you Mac, and you want time machine to back up more frequently you need to change the value. It is in seconds. The default is set to an hour which is 3600. Change this value to suit, half and hour is 1800 seconds.

sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 1800

27) Kill A Process

Sometimes you just need a process to stop running. If you want to kill it in Terminal with out using Activity Monitor, find the process ID (In Activity Monitor) and then use the following command. Only really useful if you don’t like much clicking or are writing a program.

kill PID 478

28) Let Terminal Talk

If you are bored one day you can get Terminal to quickly talk anything back to you using the voice engine. Replace hello with anything you want.

say hello

29) Make Hidden Applications Icons Transparent


If you hide a lot of applications you can make there icons transparent in the dock. A very good visual clue.

defaults write com.apple.Dock showhidden -bool YES
killall Dock

30) Make The Dock Spring Loaded

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

defaults write com.apple.dock enable-spring-load-actions-on-all-items -boolean YES

31) Recent Applications Stack

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

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

32) 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 com.apple.iTunes invertStoreLinks -bool YES

33) Pin The Dock To The Left

This command pins the dock to the left hand side of the screen. I’m not sure what happens if you have the dock on the left or right edge. Replace start with middle to revert.

defaults write com.apple.dock pinning -string start

34) Pin The Dock To The Right

Exactly the same as above except it pins the dock to the right hand side of the screen.

defaults write com.apple.dock pinning -string end

35) Play Star Wars Episode IV


Using a simple telnet address you Terminal will connect in and play Star Wars Episode IV in its ASCII glory.

telnet towel.blinkenlights.nl

36) Quicklook A File

Quicklook is a great little application in Leopard. The command lets you quicklook a file right in Terminal. First you need to change the folder by using the “cd” command and then the folder you want. To enable this command to work you need to type the file name exactly.

qlmanage -p "Jaguar Aqua Graphite.jpg"

37) 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/Spotlight.app
killall Spotlight

38) Remove The Stripes In List View

A simple hack that removes the alternating stripes in list view in finder.

defaults write com.apple.finder FXListViewStripes -bool FALSE
killall Finder

39) Turn The Menu Bar White

If you don’t like the menu bar in its cool transparent glory you can change it so it appears white. This requires a password and you will need to restart you mac.

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 1

40) Turn The Menu Bar Grey

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

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 0

41) 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/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables'

42) Set The Expanded Print Dialogue As Default

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

defaults write -g PMPrintingExpandedStateForPrint -bool TRUE

43) Set The Expanded Save Dialogue As Default

Similar as the print dialogue this sets the save dialogue to the expanded view as default. Requires restart.

defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE

44) Set The Screen Saver As The Wallpaper


This command sets the currently selected screen saver as the desktop background. Use command + c or . to stop while in Terminal. Alternatively you can use wallsaver.

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

45) Set The History Limit In Safari To A Number Of Items

If you don’t want a massive history you can set it to a limited number of items. Change the number to suit.

defaults write com.apple.Safari WebKitHistoryItemLimit 2000

46) Set The History Limit In Safari To A Number Of Days

Similar to the hack above you can set the number of days Safari keeps its history.

defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30

47) Show Hidden Files In Finder


A lot of the files in Finder are hidden. This is probably a wise choice by Apple as there are countless things you can screw up. But 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, if you screw something up don’t come complaining. Repeat the command with false to revert. The image above, click for larger version, show the amount of files there actually is, with these hidden there is only 4 shown normally.

defaults write com.apple.finder AppleShowAllFiles TRUE

48) Skip Disk Image Verification

If you want to save some time you can skip the disk image verification for a disk image. Potentially risky as a whole load of things could go wrong without you knowing.

com.apple.frameworks.diskimages skip-verify TRUE

49) Show SubFolders In Graphical Format In Terminal

This is a very cool little hack that enables you to show an ASCII graphical view of sub folders. Use the cd command to change to a directory other wise the command will list every folder. For more information look here.

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'

50) Speed Up Dialogue Boxes

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

defaults write NSGlobalDomain NSWindowResizeTime 0.01

Thats 50 top Terminal commands, I wanted to go to 100 but I couldn’t find 100 good commands. If you have any tips please leave a comment below explaining what the tips does and why you like it. If you just want to leave a comment you can, just be clear, since garbled comments are hard to understand.

If you want to take your skills with Terminal a bit further I recommend you check out the Terminal Category on this site. If you fancy reading a book there is a couple on Amazon that I regularly see mentioned and recommend, O’reilly Unix Geeks and Unix Under the Hood both are designed for Mac OS X and take Terminal further.


If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips

132 Responses to “Top 50 Terminal Commands”

  1. 1

    Great resource, I’m still using Tiger and don’t plan on upgrading anytime soon, bu a lot of these were very applicable.

    I never knew that Safari had the equivalent of Firebug built in, I think that just became my browser of choice.

    Showing which icons are hidden is also rather convenient.

    Comment By Aea on February 12th, at 5:07 am

  2. 2

    I might consider using safari again since it has firebug.

    Thanks for commenting.

    Comment By James Powell on February 12th, at 8:26 am

  3. 3

    I didn’t digg it, but I gave it a thumbs up on stumbleupon.

    Comment By Joel Stephan on February 13th, at 9:57 pm

  4. 4

    Help! I tried the expose icon one, but I don’t like it. How can I get rid of it?

    Comment By Anonymous on February 16th, at 11:38 pm

  5. 5

    I figured it out, nevermind! Thanks anyway.

    Comment By Anonymous on February 17th, at 12:13 am

  6. 6

    i did the dock icon magnification thing how do i get rid of it???

    Comment By Anonymous on February 19th, at 1:12 am

  7. 7

    How do I undo this… NOw nothing happens when I press f12.

    18)Drag A Widget Onto The Desktop

    Probably one of the coolest hacks. This command 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. This may need you to log off or restart for it to take effect.

    defaults write com.apple.dashboard devmode YES

    Comment By phil on February 21st, at 4:44 pm

  8. 8

    Restart your computer or do the same command and replace yes with no. You may have to restart finder.

    Comment By James Powell on February 21st, at 4:46 pm

  9. 9

    James – Thanks for the speedy response. I try the suggested remedy, but no luck. Status Quo.

    F12 – Does nothing, but my mouse disappears.

    Note: I am running 10.4.11

    Comment By phil on February 22nd, at 2:06 am

  10. 10

    Any follow up after the last recommended post. Status Quo at my end.

    Any help is appreciated.

    Dashboard appears to be running but I cannot display Widgets.

    Comment By phil on February 25th, at 4:57 pm

  11. 11

    i can’t seem to get the dock back to 3D even when i add a “NO” to the end of the line. please help!

    Comment By Anonymous on April 20th, at 1:18 pm

  12. 12

    Ok i tried the dock magnification code and it didnt work, i have a 10.4.11 mac. Do you need your system preferences to be unlocked so this works. This macintosh is a school computer

    Comment By Anonymous on April 25th, at 10:56 pm

  13. 13

    Use your original image.

    Comment By James Powell on May 1st, at 8:06 pm

  14. 14

    I cant get the pie chart indicator to work properly…
    I have no idea why though, I’m using the latest version of both leopard and safari.
    Any ideas?

    By the way, the star wars one is AWESOME!
    (you should add some of the emacs games to this list!

    Thanks!

    Comment By Angus on May 23rd, at 8:20 am

  15. 15

    i entered some of these cool tweaks. suddenly now, the terminal prompt reads:
    LENOVO-EAF02D7C:~ [directory name]$
    i never noticed what it read before, but this seems strange??? if anything, at least not lenovo?
    who has hacked their way into my mbp, and how can i get rid of this?

    Comment By nic on July 5th, at 1:09 am

  16. 16

    if this doesn’t make the dock 3d ur screwed

    defaults write com.apple.dock no-glass -boolean NO; killall Dock

    Comment By matt on July 9th, at 2:09 pm

  17. 17

    @ Patrick. Not off the top of my head. If I find out I will post it up.

    Comment By admin on July 12th, at 9:28 am

  18. 18

    can you make a keyboard command (spacebar) on Finder’s play, rewind, forward, audio preview?

    Comment By jonathan on July 18th, at 7:00 am

  19. 19

    @ David. Use the “Show View Options” on the right hand click menu to change you icon size back to normal.

    Comment By admin on July 22nd, at 11:37 am

  20. 20

    Yo type this in Terminal

    emacs

    Then press

    esc

    then press

    esc x

    at the same time, then type in either , Snake Tetris Pong Life Or doctor

    Have fun!

    Comment By Mac Rcoker on August 3rd, at 9:54 pm

  21. 21

    Joey, do the same thing, just change the “YES” to a “NO” in the first line.

    And of course ‘killall Dock’ after words to see the results.

    Thx

    Comment By Anmar on August 25th, at 4:10 am

  22. 22

    Thanks Anmar for that. Beat me to it.

    Comment By admin on August 25th, at 12:03 pm

  23. 23

    Hey guys,

    I typed in terminal: “defaults write com.apple.dock no-glass -boolean YES
    killall” to try it.
    I’ve replaced the YES by a NO but it stays the same… help!

    Comment By Apple01 on August 25th, at 5:27 pm

  24. 24

    You need to type “killall” Dock for it to work.

    Comment By admin on August 25th, at 5:55 pm

  25. 25

    Hi

    I am trying to drag a widget to my desktop, but no success. I have a Macbook Pro. F12 is for volume and even if I change it to a normal function key, I cannot get the widget to the desktop. Please help as I think this will be great!

    Comment By Piet Nel on September 6th, at 12:56 pm

  26. 26

    It takes a little bit of a knack to get it right. What I have found is if you click and hold on the widget, drag it around you dashboard. While you are doing this press F12 and it should pop off. Do the same but on your Desktop to get the widget back onto the Dashboard.

    I hope this helps.

    Comment By admin on September 6th, at 4:26 pm

  27. 27

    I think your problem is you’re not really using the function you set up for F12 at all because the volume is on top of it by default.
    To use the normal F12 button, press and hold ‘fn’ button + F12 at the same time as you’re dragging the widget with your mouse.

    One thing I noticed while trying this cool feature, if you have a window open on the desktop, like the finder window, the widget will hide as soon as you use the F12 function in the desktop.
    It’ll only show on the dashboard (ironically) but still useless that you can touch it or change anything in it. You can simply remove it when you go to dashboard settings.

    So to avoid this, simply make sure your desktop is clear when you use the function and drag any widget into it.

    Have Fun

    Comment By Anmar on September 6th, at 11:49 pm

  28. 28

    Thanks Anmar for that comment. Basically there are a millions ways of doing one thing on a Mac. You should have to find the one that works with the least troubles.

    Comment By admin on September 7th, at 1:16 am

  29. 29

    Yes. It just shows you the running processes on your computer. Similar to Activity Monitor.

    Comment By admin on September 8th, at 7:09 pm

  30. 30

    @Kyle, change yes to no. Its mentioned in the previous comment if you look.

    Comment By admin on September 26th, at 11:36 am

  31. 31

    Awesome Guide, but for some reason I changed my Login Avatar…
    I’m on a school laptop, so I don’t have all my stuff unlocked on System Preferences.
    How do I revert this?
    (I’m not sure, but it has to do with the one with changing Desktop Picture)

    Comment By jT on October 1st, at 2:35 am

  32. 32

    Also, I can’t get rid of the Develop thing at the top of the Safari Bar.
    It says “Debug” on the guide, but here it says Develop.
    Thanks!

    Comment By jT on October 1st, at 2:36 am

  33. 33

    Most commands can be reversed by replacing YES with NO. Regarding the desktop picture I have no idea how it has happened. The best bet would be to to redo the command but with a different picture and see if it happens again.

    Comment By admin on October 1st, at 3:00 pm

  34. 34

    Hey
    Just wanted to share what i think is a cool thing.
    Firstly you need to enable terminal on start-up (system preferences – Accounts -Login Items)

    Then open terminal and goto preferences then shell and delete all text and add PS1=”Yes Master? ” ; say Yes Master? (anything in ” ” you can change to your own text)

    Basically what this does is makes your computer say yes master every time terminal opens and because it opens on startup it will say as you log in !!!

    ( the PS1=”Yes Master? ” bit is just cool thing at the side of terminal instead of your present working directory) fun for people who use terminal a lot.

    and hey who calls you master everyday?

    Hope you like it!

    Comment By GG on October 6th, at 8:47 pm

  35. 35

    A very cool command. Thanks for sharing.

    Comment By admin on October 6th, at 8:56 pm

  36. 36

    you know there is terminal command that lets you select what voice you want to use
    here is the code:
    say -v fred your text

    you can replace fred with any voices that are on your system
    here are some voices that come with mac:
    Alex, Bruce, Fred, Junior, Ralph, Agnes, Kathy, Princess, Vicki, Victoria
    you can see all of them in system preferences speech section.

    Comment By august on October 8th, at 12:15 pm

  37. 37

    Is it possible to make the menu bar purple or blue or green? Is it possible to do something like this to all of the mac programs you have?

    Comment By Cmchrono on October 8th, at 11:26 pm

  38. 38

    I’m trying to find a way to change the sound output device via terminal commands. After much searching I can’t seem to find the commands. Do you know how I can get Terminal to change the sound output in System Preferences > Sound > Output, from say, “Built-In Line Output” to “Built-In Output”?

    Thanks, rg

    Comment By rg on October 23rd, at 11:40 pm

  39. 39

    Wow thanks for all the tips. I cant wait to get home a try them out…

    Comment By custom logo designer on October 24th, at 10:42 pm

  40. 40

    How do you reverse the “Set Screen Saver as Wallpaper” command? This would be a VERY useful thing to know know that I’ve stupidly already done it.

    Comment By zebra on October 27th, at 9:14 pm

  41. 41

    About the “Set Screen Saver as Wallpaper” question… never mind. It resets when you close Terminal. Thanks anyway!

    Comment By zebra on October 27th, at 9:17 pm

  42. 42

    How do make it so you can make it stop pinning the dock?
    in the: defaults write com.apple.dock pinning -string end code

    Comment By technogeak on October 30th, at 10:14 pm

  43. 43

    Just go through System Preferences, any changes you make should reset the preference file.

    Comment By admin on October 30th, at 11:15 pm

  44. 44

    Hi, I just tried the 2D dock change and I am having problems changing it back. Can you give me a hand.! thanks

    HC.

    Comment By Guambra on November 10th, at 8:23 am

  45. 45

    So no to be a pain, but what are the exact steps to, for example, enable the “show item path in finder”. I copy and paste the code but it says
    “Command not found”
    Whats up??

    Thanks

    Comment By jdool on November 17th, at 4:49 am

  46. 46

    i used the blue bubble thingy and the 2d dock changer but i cant figur out how to change it back plz reply

    Comment By slanky on November 20th, at 4:41 am

  47. 47

    the widget on the desktop is great. Is there anyway to make it so that the widget isn’t always on top? It would be great if the widget behaved like a normal window

    Comment By chris Maury on November 28th, at 5:52 am

  48. 48

    “One of may favourite hacks as it lets you see the current path of the Finder window you are in. Its great if you work with a lot of windows.
    defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

    the code is incorrect
    try
    defaults write com.apple.finder _FXShowPosixPathInTitle -boolean YES

    Comment By Anonymous on November 28th, at 7:32 pm

  49. 49

    How do I undo the Drag Widget to Desktop hack on terminal. Its messing up my computer.

    Much Thanks,
    Joseph D

    Comment By Joseph D on December 21st, at 4:44 am

  50. 50

    I used the Expose button command with the big blue dot
    (defaults write com.apple.dock wvous-floater -bool YES
    killall Dock)

    and i would really like to know how to get it off of my desktop, please send the information required.

    Thanks,
    Jim

    Comment By Jim on December 23rd, at 3:58 am

  51. 51

    44) Set The Screen Saver As The Wallpaper – is there a way to hack this code so the screen saver wallpaper will run after terminal is closed?

    Comment By DB on December 29th, at 4:48 am

  52. 52

    HOw do you revert number 2) Grdient behind a stack item? I did it, and now my dock has disappeared…..

    Comment By Zuhayr AHmed on January 26th, at 8:37 pm

  53. 53

    Restart your dock. It should be there.

    Comment By admin on January 26th, at 9:17 pm

  54. 54

    i tried 2) and now my dock has disappeared. I do not know what to do. Help please.

    Comment By Mike on January 30th, at 2:34 am

  55. 55

    i tried 2) and now my dock has disappeared. I do not know what to do. Help please..

    Comment By Mike on January 30th, at 2:37 am

  56. 56

    UM I CAN’T GET THE 3D DOCK BACK?!

    Comment By Jerry on February 13th, at 2:45 am

  57. 57

    I added the bigish blue button to my desktop (#4). How can I remove it?

    Comment By Oracle7 on February 15th, at 6:55 pm

  58. 58

    oracle:

    defaults write com.apple.dock wvous-floater -bool NO

    and then:

    killall Dock

    Comment By muenster on February 15th, at 8:54 pm

  59. 59

    How can i get rid of this!?

    4) Add An Exposè Button To The Desktop

    Comment By Sean on February 16th, at 8:03 pm

  60. 60

    how to undo this command i.e. what if I want to get rid of it:

    4) Add An Exposè Button To The Desktop

    defaults write com.apple.dock wvous-floater -bool YES
    killall Dock

    I am new to the world of terminal little help will be appreciated.

    Comment By muktader on February 25th, at 2:46 am

  61. 61

    Anybody looking to reverse a command:

    All you have to do is open up terminal, type the command again, and replace TRUE or YES to FALSE or NO (or vice versa). It’s the equivalent of erasing it from the application’s defaults. For example, to show all Finder items you would type

    defaults write com.apple.Finder AppleShowAllFiles TRUE
    killall Finder

    and to reverse that default after you are done with the hidden files you type

    defaults write com.apple.Finder AppleShowAllFiles FALSE
    killall Finder

    That’s really all there is to it. Hope I was helpful to some people not well versed in Terminal yet.

    Comment By Chris on February 26th, at 12:19 am

  62. 62

    To keep screensaver background even if you close terminal you can add an & at the end, to run it in the background:


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

    To stop it you’ll have to kill the process:


    killall -9 ScreenSaverEngine

    Comment By Gregory on March 5th, at 8:55 pm

  63. 63

    very handy… many thks

    noticed an error
    to show path in window, you do NOT want a space between “apple.finder” and “_FXShowPosixPathInTitle

    it seems to work if you type it as “…apple.finder_FXShowPosixPathInTitle -bool YES”

    Comment By Mark W on March 7th, at 6:36 am

  64. 64

    will these terminal commands work for 10.4? or should it be o.k. because they both use the Bash shell.

    cheers

    RUFIO

    Comment By Rufio on March 11th, at 3:56 pm

  65. 65

    I did the first trick of making your dock a 2D flat version and I was wondering how to reverse the effects…….
    Please Help

    Comment By Zack on April 5th, at 4:51 pm

  66. 66

    Does anyone know if there is a Terminal command to change the address bar default in Safari from “.com” to say “.ch” (Switzerland)..? You know, if you enter a word in the address bar (for example “ford”) Safari will then add “http://www.” and “.com” to find the site. What I want Safari to do is instead of the default “.com” I want it to default to “.ch”.

    Comment By paul on April 7th, at 7:28 am

  67. 67

    Does anyone know if there is a terminal command to make dashboard widgets that you have put on your desktop stay BEHIND all open windows?? because i want to put a stick note pad widget on my desktop, but when I open any application, it goes over top of the app and makes it hard to use. anyone have any suggestions?
    thanks

    Comment By Connor on April 27th, at 3:17 am

  68. 68

    another terminal command/s:

    type:
    emacs
    (return then hold:)
    esc x
    (then type:)
    doctor

    Comment By Matthew on May 8th, at 4:40 am

  69. 69

    others

    type “emacs” (without the quotation marks)
    hit return
    then wait 4 a bunch of typing to come up,
    then hold esc and press x then type eather “pong” “snake” or “doctor”

    Comment By Black_Raven on May 9th, at 1:33 pm

  70. 70

    I have a question about the double scroll arrows on both sides:
    What do I do if it says “Unexpected argument AppleScrollBarVariant; leaving defaults unchanged.”?
    How do I get past this?

    Comment By Ed on May 13th, at 9:17 pm

  71. 71

    for #34 (dock pin) replace start w/ end for right pinning

    Comment By James Collins on May 19th, at 11:22 pm

  72. 72

    I remember the “telnet” Star Wars in DOS!

    Comment By BrownyTCat on May 27th, at 10:17 pm

  73. 73

    Very useful. Running some of these terminal codes have allowed me to make my MacBook Pro faster, more customizable and slightly different than the average Mac user.

    I recommend Mac Pilot if you also want to make any finer adjustments.

    Another: Fine tune the volume in OS X Leopard: Shift + Option[Alt] + Volume Button

    Comment By TsundereWorks on June 21st, at 5:40 am

  74. 74

    wow that fine tune volume could really come in handy ( NOT being sarcastic)

    Comment By Andrew burn on June 21st, at 10:03 pm

  75. 75

    Hey I was wondering if there where any commands for the installation process as my mac is not recognizing my hard drive anymore. Any help would be very useful. The system just started acting weird not being able to install the system from the dvd rom to the hard drive. Also, are there any commands for disc ejection as the installation disk is now stuck in the macbook as well.

    Comment By Mark on June 25th, at 3:57 pm

  76. 76

    defaults write com.apple.finder DesktopViewOptions -dict IconSize -integer 12

    killall finder

    Comment By frederic on July 3rd, at 5:03 pm

  77. 77

    hey these hacks look great i never knew i could do any of these things as i am reasonably new to macs. 1 question… once i have opened up ‘Terminal’ to type in the commands, where do i actually type them in? it may seem like a stupid question but i really don’t know what to do! do i go ‘File’ then ‘New Command’ and type it there or not? and once ive typed it in, do i need to quit the application for it to start working or is it instant? thanks for your answer

    Comment By Billy Brown on July 8th, at 1:52 am

  78. 78

    To get the blue Exposè button off your desktop. I typed defaults write com.apple.dock wvous-floater -bool NO. Then I hit enter and typed killall Dock.

    Comment By El on July 11th, at 2:48 pm

  79. 79

    i tried the command for the Exposè button but now i cant get rid of it help me please this is the command if it helps
    defaults write com.apple.dock wvous-floater -bool YES
    killall Dock

    Comment By Cameronaaron on July 22nd, at 11:25 pm

  80. 80

    hey i used the following thing and posted it into terminal: defaults write com.apple.dock no-glass -boolean YES
    killall Dock
    How do i undo it please respond

    Comment By Chase on July 28th, at 3:35 am

  81. 81

    I feel really quite stupid, but I need help. I open terminal and by default it is in bash. it says name of my mac:~username$ then the icon. I tried to type in these commands but none of them seem to be working, help would be greatly appreciated, thank you

    Comment By bill on August 3rd, at 6:36 pm

  82. 82

    if u cant get the dock to change back to 3D (which happened to me) download “dock doctor” its free, safe, and WILL fix it. http://www.innermindmedia.com/dock_doctor_app.html

    Comment By Matt on August 6th, at 5:00 am

  83. 83

    Rob,

    You can change the numeric value from 512 to any number you wish e.g. 48

    or go to View menu in the Finder and choose ‘Show View Options’. Here you can set the Icon size.

    Comment By Ron on August 16th, at 11:33 am

  84. 84

    Cool, I love OSX hacks etc, though I can’t use the top one as I’m on Tiger. But at school they have Leopard and I don’t like the 3D effect…

    Btw I’m 13 too Andrew LOL!

    Comment By Mr Sir on September 2nd, at 7:20 am

  85. 85

    Hello!
    Need help, please.

    How can i revert number 9? :

    9) Change The Login Picture
    If you get a bored of the space picture used on the login screen, you can change it with this little 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/com.apple.loginwindow DesktopPicture “/System/Library/CoreServices/Finder.app/Contents/Resources/vortex.png”

    Thanks,
    Marius Bøstrand

    Comment By Marius Bøstrand on September 13th, at 4:22 pm

  86. 86

    HELP!!! I used the disable dashboard one, and now I can’t get it back

    Comment By Ryan on September 19th, at 12:17 am

  87. 87

    Hello,

    I just tried the following hack:

    31) Recent Applications Stack
    This command creates a new stack in your dock so you can view the recently used Applications.
    defaults write com.apple.dock persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }’

    Now I don’t have the dock at all, nor do I have my expose or dashboard. I tried redoing the command with a 0 instead of a 1, but that didn’t work either.

    I’m running 10.5.8.

    Thanks,

    Josh

    Comment By Josh on September 20th, at 10:41 pm

  88. 88

    Hi i just tried the pin dock thing and can’t undo it how can i do this?

    also on my desktop their is this permanent file .DS_Store every time i delete it it just reapperes i about 10 seconds how do i get rid of it ?

    thnx,

    kevin

    Comment By kevin on September 24th, at 1:00 am

  89. 89

    hey guys. This is great but for those of you that are scared about opening terminal, ive put together a dmg file that you can open and it will do all of the work for you. Mind you, i only did a few of the ones I use because I dont trust the rest of them.
    you can get the file from
    Here
    you are more than welcome to change it to whatever you want. have fun.

    Comment By Joubin on October 2nd, at 3:43 am

  90. 90

    hey guys well i used the magnification for the dock images and the dock it self trick and now the dock is slightly to the left and whenever i try making the size of the dock smaller (with the mouse going up & down) it goes all the way to the left … can someone help me make it back to normal please!

    Comment By ineedhelp! on October 17th, at 10:14 pm

  91. 91

    i have tried the ENABLE QUIT IN FINDER trick and i want to disable it. i changed the yes to a no. this is the code i am using

    defaults write com.apple.finder QuitMenuItem -bool NO
 killall Finder

    please help me

    Comment By Benny on October 27th, at 2:03 am

  92. 92

    I understand that Terminal can be very scary for people that never use it, or understand it, but can you please read the comments above you, PLEASE?

    What’s supposed to be some good commenting or new discoveries is instead:
    HALP I DID THINGS AND NEED TO UNDO.

    while it may not be completely intuitive for the average user to pick out “true” and “yes” will be the opposites of “false” and “no” and will likely reverse what you did, it is completely reasonable to expect you to read the comments already here, which all explain that you just change those key words to the opposite words, and voilà.

    if you’ve tried this, then ok, comment away, you’re not the audience here.

    Comment By Dan P on November 16th, at 4:43 am

  93. 93

    i tried #19 and want to reverse it. i changed 1 to 0 and nothing happened PLEASE HELP!

    Comment By chase on November 29th, at 9:35 pm

  94. 94

    Everyone who wants the 3D dock back replace the yes with NO!!! Then you give a command called: killall Dock
    Remember the Capital D in dock, copy and paste if you can! IT changes the dock! Remember this is only for the 2D to 3D dock or 3D to 2D dock! Hope this helps!

    Comment By Anonymous on December 2nd, at 6:36 pm

  95. 95

    Please tell me how to get rid of

    4) 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 com.apple.dock wvous-floater -bool YES
    killall Dock

    Comment By an important question on December 18th, at 1:56 pm

  96. 96

    Play Tetris, Snake and Pong:
    1. type in emacs
    2. press enter
    3. press esc
    4. type x(tetris),(snake) or (pong)

    You steer with arrows in all three games, but Pong i 2player, and u steer the other player with 4,6

    Comment By Morten Steffensen on December 19th, at 5:44 pm

  97. 97

    Hey, I have a problem with a folder that i can’t delete on my destop, any time i move it to the trash the password prompt pops up. I can’t even move it off the desktop all it does is copy. What happened was that I had it locked and went to delete it but instead deleted all the files in it then when i unlocked the folder it prompted the password.

    Is there a way i could kill it using the terminal?

    PLEASE HELP, since this happened i can not take screenshots as the message ‘Cannot write file to intended destination.Please make sure that the destination folder is writable.’

    Comment By Suzanne on January 4th, at 4:30 pm

  98. 98

    I tried the command where you make the dock 2D and when I tried changing yes to no nothing happened. I am running Snow Leopard.

    Comment By An escaped baboon on January 12th, at 5:31 am

  99. 99

    @Jerry,To revert back to the 3D dock,open ‘System Preferences’ and go to ‘Dock’.Then,briefly change the position of the dock and then select ‘bottom’.This replaces the ‘Tiger-like’ dock to the normal 3-D dock.Works for me.

    Comment By Lee on January 14th, at 12:04 pm

  100. 100

    I tried customizing the login screen but it didn’t go as planned. I’m wondering if anyone can tell me how to reverse the effects. All i have on the login screen now is a blue screen. Is there a command i can enter to get it back to default?

    Comment By Alex on January 15th, at 6:57 pm

  101. 101

    I tried changing the login screen pic but it just went to a blue screen and now it change back, any tips?

    Comment By ssny on January 25th, at 5:19 am

  102. 102

    I just wanted to write back and let you guys who are trying to figure out how to change your login picture that I figured out how to do it. Here’s what I did:
    I opened HD/System/Library/CoreServices,
    then I found the picture named DefaultDesktop.jpg and drug it onto my desktop to save the default picture.
    then I found the pic I wanted to use as my login pic and named it DefaultDesktop.jpg
    then typed in the code replacing vortex.png with DefaultDesktop.jpg
    and it worked.

    let me know if that was confusing

    -Scott

    Comment By scott on January 25th, at 9:14 pm

  103. 103

    Top get the original image back, copy and paste it back to where ever you moved it from. Usually the trash.

    Comment By admin on January 25th, at 9:14 pm

  104. 104

    for number 9
    i copied in defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture “/System/Library/CoreServices/Finder.app/Contents/Resources/vortex.png”

    and this came out

    “2010-02-12 00:19:10.632 defaults[220:903] Could not write domain com.apple.loginwindow; exiting”

    I’m using Mac 10.6.2

    Comment By patrick on February 11th, at 5:21 pm

  105. 105

    dude can you undo -

    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 com.apple.dock wvous-floater -bool YES
    killall Dock
    please i want to undo it

    Comment By abteen on February 11th, at 6:25 pm

  106. 106

    Can anybody tell me how to exit out of terminal properly (Terminal command for save&exit out of terminal window) after saving the changes or commands I have done.

    Comment By Ciril Tomy on February 16th, at 12:43 pm

  107. 107

    hellpppp ive tried puting no instead of yes for the first one and it still wont go :( pleeaassee help me its really annoying me now

    Comment By tom on February 16th, at 12:45 pm

  108. 108

    Help me please
    I did number 7 and increased the size of the desktop icons and now I don’t know how to change it back.
    Please help me

    Comment By anonymous on February 20th, at 2:23 am

  109. 109

    I can’t do the debug menu for safari and it is getting annoying. I tried doing it when safari was not running, but that still didn’t work. please help me!

    Comment By - on February 20th, at 3:19 pm

  110. 110

    thanks very much, very useful, could do with an update on the login screen background so that it works for snow leopard.

    many thanks

    Comment By Thomas on February 25th, at 3:11 pm

  111. 111

    So i did the command that makes the dock 2D and i don’t know how to change it back. any help?

    I also made it so that the applications in my dock inlarge when i scroll over them and i would like to put that back to normal.

    Thanks

    Comment By Karina on March 17th, at 4:21 am

  112. 112

    I would like to reverse these:

    1) 2D Dock
    This quite a popular hack for the people running Leopard and don’t like the 3D feel. It changes the 3D dock to a flat 2D version. To enter copy and past the following code.
    defaults write com.apple.dock no-glass -boolean YES
    killall Dock
    6) Increase Dock Magnification Size
    This little hack lets you increase the size of the magnification of the dock icons. Don’t go past 512.
    defaults write com.apple.dock largesize -int 512
    7) Increase Desktop Icon Size
    If you want massive icons on you desktop this little hack lets you increase the icons to 512 pixels x 512 pixels. This is massive, may slow down on older machines. I don’t think it goes larger than 512.
    defaults write com.apple.finder DesktopViewOptions -dict IconSize -integer 512
    killall Finder

    Comment By Karina on March 17th, at 7:25 pm

  113. 113

    I did number 7 and now my whole desktop is HUGE can someone tell me how to reverse it?

    Comment By Karina on March 17th, at 7:27 pm

  114. 114

    Matt and Katrina,

    Use the same code:

    defaults write com.apple.finder DesktopViewOptions -dict IconSize -integer 512
    killall Finder

    Instead of “512″ insert the desired size. Probably around 60 will put it back to normal size.
    Same goes for the dock code.

    For the dock 2D, type NO instead of “YES”.

    Hope this helps.

    Comment By Shilah on March 20th, at 4:04 pm

  115. 115

    Can you help me?
    I dont know how to remove the 2D dock comand.
    THANKS

    Comment By Santiago on April 6th, at 8:01 am

  116. 116

    TO UNABLE THE 2D DOCK USE:

    defaults write com.apple.dock no-glass -boolean NO
    killall Dock

    Comment By pedro on April 6th, at 8:12 am

  117. 117

    hey i did the one to make your desktop icons huge, and to reverse it i typed:

    defaults write com.apple.finder desktopviewoptions -dict iconsize -integer 60 killall finder

    but nothing happened!

    Comment By desi on April 9th, at 12:33 am

  118. 118

    Oh man! how to you return the dock to 3-D HELP PLEASE!

    Comment By de on April 16th, at 1:53 am

  119. 119

    Hi James,

    Thank you for the hacks. They are awesome! I really like the “finder quit”, “address in the finder title area”, and the “widget drag hack”. Really cool stuff! Thank you very much!

    I had an error with one. “Enable Double Scroll Arrows” (no’14) has not altered my scroll bars – it seems to have put two arrows on my PDF icons. I can flick through the mini pages in icon state – which is funny – but id like to turn it off. I checked system preferences to no avail. Do you think you could you tell me how, please? I would really appreciate your help with that.

    Incidentally, I wonder what is needed to alter the scroll bars? Im using 10.6.3

    One last question if you wouldnt mind, the “Recent Applications Stack” (no’31) is working perfectly for me. I love it. I was thinking, you would probably know how to create a “Recent Items Stack” too, right? Or is that one a little tricky?

    Thanks for sharing all these hacks James.

    Jonny

    Comment By Jonny on April 21st, at 2:25 pm

  120. 120

    @de… for the millionth time… USE THE SAME COMMAND BUT WITH NO INSTEAD OF YES

    Comment By TsarProdigy on April 24th, at 8:22 am

  121. 121

    ATTENTION! if u tried to change the login screen pic but your stuck with ugly blue I KNOW HOW TO HELP

    1st got to macintosh hd> system> library> core services

    2nd right/secondary click on the finder logo and choose show package contents> contents> resources

    3rd pick out any pic u want for the background. name it “vortex.png” (u can turn a jpg into a png using preview)

    4th drag that into resources. it will tell u u cant put it there, but u can if u click authenticate and type your password.

    5th now that vortex.png is in there, type the same terminal command that was listed in the article.

    6th type exit

    7th log out and see if it worked. it did for me and im using 10.6 snow leopard. if u have leopard or tiger it should still work though

    i hope i helped u!

    Comment By Charlie on May 1st, at 2:57 am

  122. 122

    another funny trick is
    1. cmd+shift+A
    2.cmd+A
    3.cmd+shift+O

    after you used it you can use it on your friends
    an easy tool ;)

    Comment By marnix tissing on May 11th, at 2:36 pm

  123. 123

    Non of these worked for me on Snow Leoperd…. besides the Widget one witch I have done before….

    Comment By FLamespinner on May 16th, at 10:22 pm

  124. 124

    Wonder if anyone can vouch for this – a fix for an installation problem…
    Scares me to use it! Anyone? Thanks!

    sudo /usr/sbin/installer -pkg /Volumes/GoogleEarth-Mac-Plugin
    /GoogleEarthPlugin.mpkg -target /

    Pat

    Comment By Pat Russell on May 22nd, at 2:00 am

  125. 125

    Never mind i Figured out a fix for #’s 34 & 35 just change “end”/”start” to “center”
    So Type…
    defaults write com.apple.dock pinning -string center

    Comment By Colin Placke on May 22nd, at 5:33 pm

  126. 126

    1) 2D Dock

    This quite a popular hack for the people running Leopard and don’t like the 3D feel. It changes the 3D dock to a flat 2D version. To enter copy and past the following code.
    defaults write com.apple.dock no-glass -boolean YES
    killall Dock

    how can I undo this??

    Comment By Cevin on June 9th, at 5:26 pm

  127. 127

    hey huys i know some of u have been having trouble trying to get rid of the big blue dot

    first change the “YES” to a “NO”
    then push enter
    then type “killall Dock”
    (make sure its exactly the same)
    then hit enter
    (took me an hour to figure it out dont feel bad if u dont get it first go

    Comment By Louis on June 10th, at 4:04 pm

  128. 128

    i tried doing the drad a widget onto the desk top hack it didnt work but when i press f12 the volume goes how do i grt to press f12

    Comment By chris stachyra on June 29th, at 1:15 pm

  129. 129

    How do I disable the wallpaper into screensaver hack?

    Comment By anonymous on July 2nd, at 2:14 am

  130. 130

    So I’ve been fooling around with the grid gradient backgrounds however my downloads is still a fan view and I like to keep it that way. Nothing that I have done with the code or any tries always turn out unsucessful, but I would like to know if it is at all possible to enable this background for the grid view only and not fan. If not, wondering if you know where the blue image file is in the system folder. I have already changed the ugly blue expose glow to a nicer color for the eyes. Also, if I may stretch so far, Wondering if you know if it’s possible to keep the color x, minimze and window buttons when in the graphite theme.

    Comment By John on July 4th, at 11:56 pm

  131. 131

    Hey I added recent applications stack, but decided I don’t like it. Unlike most of these terminal commands you cannot just turn true into false, or 1 into 0 or YES to NO. :/ Can someone tell me how to get rid of it. :O Thanks. -Chris

    Comment By Chris on July 19th, at 6:37 am

  132. 132

    Never mind… It is just like any other stack. Lol (just drag it off of your dock) I was so caught up in all this Terminal codes and stuff, I overlooked the obvious. LOL!

    Comment By Chris on July 19th, at 7:08 am