So, Mac's file browser, Finder, has decided to once again crap out on me. I opened the lid to my Macbook, and while I could see all of the icons on my desktop, I couldn't actually click on any of them. Well, if you have had a similar experience, you may know that most people tell you to simply restart. Here's a better solution:
With finder in the foreground (ie the text next to your apple icon on the top left says "Finder") press Shift+Apple+U to open Utilities, then double-click on Terminal
In Terminal, type:
sudo su
Enter your password, then type in:
killall Finder && open ~
After that, everything should be as good as new. Here is what we just did:
"sudu su" tells the computer that we would like to become the administrator as to run some seriously bad-ass commands, no questions asked
"killall Finder" will find all running processes named Finder and murder them and their family
and the "&& open ~" ensures that we launch a new instance of Finder. Now, Mac should auto-launch a new finder window once it has noticed that you killed the currently running instance, but launching a new instance manually (ie && open ~) is a good habit to get into, in case you try this on other operating systems. For the sake of understanding this last step, let's break this down a littler further
Appending "&&" to any command in terminal tells the computer, "Hey, once you are done with that last command, do this next one,too." Normally, we could simply run one command after another instead, but not when you are messing with the window manager (Finder in Mac, Explorer in Windows, Gnome or KDE in Linux) since we run the risk of losing the ability to input new commands once we close it.
In Mac, using the "open" command is it's way of launching a new Finder window. While doing this, it will launch a new instance of Finder of one doesn't exist (ie if Finder crashes), but when using "open" we have to define a folder we would like opened. You could use any valid path here, but "~" always maps to the current user's folder, so by using "~" in this tutorial, I know that this will always work (since I don't know what folders you have on your computer).
And there you have it.... does this sound remarkably like Linux ?



