Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Apparently, the Macintosh HD icon on the desktop points to the root directory but it is not showing all the contents.

Some of the files and directories are the same as those which I see when I perform an ls on / dir in Terminal, but most other directories like /usr, /bin, etc are not visible.

I'm assuming that for security, Mac OS X isn't showing the rest of the files and directories. Is there a way to change this behavior so as to make it like we view root folder in Linux?

Edit: just found the following here:

The Finder and the Terminal show different contents for the root directory. Some items in the root directory are not visible in the Finder. This reduces visual clutter and enhances simplicity. If you are familiar with a UNIX-style command line you can use Terminal to view all items in a directory.

As per this note, Terminal has to be used to view all the items. So, what do others do? Use terminal or there is some other way?

share|improve this question
    
@hhh Wrong question? –  Brian Gordon Jan 30 at 8:13
add comment

6 Answers 6

up vote 18 down vote accepted

Enter in Terminal:

sudo chflags nohidden directoryname

Whereby directory name is the name of the directory that you want to see in Finder.

Reverse this by typing:

sudo chflags hidden directoryname

The Macintosh HD basically resembles the root directory. If you want it to appear on the desktop and in finder change this in the finder preferences.


Showing all files in Finder

Type in the terminal

defaults write com.apple.finder AppleShowAllFiles TRUE

Then log out and back in.

share|improve this answer
    
doesn't seem to be working... I typed sudo chflags nohidden / Did I type it correct? Do I have to logout and login again? –  Atul Goyal Dec 28 '11 at 20:45
    
The root directory is Macintosh HD which you can show on the desktop or the sidebar of a finder window. The command surely works for any subdirectory! If you want to have the root directory appear visible in the finder you need to edit the system settings. I'll edit my answer to visualize this. –  gentmatt Dec 28 '11 at 20:51
1  
As I said in my question, I CAN see the Macintosh HD and even its contents, the problem is that after I open Macintosh HD which is supposed to be the root dir, it just shows only few directories and not all the directories like bin, usr, sbin, etc., which are present in the root (and can be seen when u do cd / and then ls. –  Atul Goyal Dec 28 '11 at 21:01
    
Well, you can make anything visible by typing defaults write com.apple.finder AppleShowAllFiles TRUE. Then logout and back in. However, the originally hidden files are greyed out. Still, you can open them. –  gentmatt Dec 28 '11 at 21:10
    
no even defaults write com.apple.finder AppleShowAllFiles TRUE is not working. –  Atul Goyal Dec 28 '11 at 21:15
show 4 more comments

Shift-Command-G in Finder brings up a "Go to folder" dialog. Type in the name of the directory, for example, /usr/local. Finder will show the directory. I use this with Finder in 'View as Columns'

While this doesn't give a browsable directory from the root directory down, I've found it quite useful.

share|improve this answer
    
thanks for the trick –  Rajender Sharma Mar 1 '13 at 12:07
    
Nice! Does the trick –  Shaihi Jul 23 '13 at 12:31
add comment

Change the command to:

sudo chflags -R nohidden /*

There is a danger in this of course. The converse will hide everything. So your best bet is to do:

ls -lo

to list the files you want to see.

share|improve this answer
add comment

The problem with using sudo chflags nohidden / is that it will unhide the root directory (which is already visible)... but you want to unhide particular folders that are inside the root directory. Which is why sudo chflags -R nohidden /* will work.

But that will make everything in the root directory visible.

Personally, I didn't want to make everything visible, just the /usr directory.

So I used sudo chflags nohidden /usr

share|improve this answer
add comment

Try this :

Open Finder > Preferences > Devices (Check the name of your Mac)

Hope this can help.

share|improve this answer
1  
This doesn't help in using the Finder to browse through /usr etc. –  patrix Aug 6 '12 at 19:49
add comment

Pressing Command+Up will go up 1 level to reveal the root directory.

share|improve this answer
1  
This doesn't make system directories visible though –  patrix Dec 30 '13 at 7:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.