Sometimes you need to have access to some hidden folders and files on OS X. It doesn’t often happen for me but for example, when you have to work with Apache, SQL, X11 or LaTeX, you have to dive into the darkness of your beautiful polished white friendly mac to have access to /usr, /etc, /bin strange things.

If you want to be able to see the root directory and all the hidden files & folders in the Finder, it is pretty easy.
Open the Terminal (Applications/Utilities/Terminal), type the following command and press ENTER:
defaults write AppleShowAllFiles YES
To make the command take effect, just restart the Finder. To do this, hold down the Option key (alt key) than click and hold on the Finder icon in the Dock. Select Relaunch from the menu.
Now open the Finder and TADA !
To reverse the process, just do the same but replace the command
defaults write AppleShowAllFiles YES
defaults write AppleShowAllFiles NO
and it will be fine.

If you want to open a file, and don’t need to really spend a lot of time in the hidden part of OS X unix structure, you can open it with a GUI editor like BBEdit. With BBEdit I go to the File menu and click on “Open Hidden…”

When you have access to all the hidden files, be careful of what you are doing because in this mode you really can mess around and break things. And well, you don’t want to break your beautiful polished white friendly mac !

Other solutions that come to you are:

Install TinkerTool

Or use sudo powa in shell mode (Terminal):
>sudo command arguments
So if you want to open the file /etc/neosqlconf with the vi application, you type in the shell the following command:
>sudo vi /etc/neosqlconf
vi is the command and /etc/neosqlconf is the argument.
You need to have the right privileges to do this.
If you want the root shell, just use one of the following commands:
>sudo tcsh
>sudo bash
With either one of those, you will be requested to type your password.
you should see root# now and you can type the ls command to list the files & directories.