Change Finder Windows View Style from the Command Line in Mac OS X

Unless it has been disabled, any Finder window in Mac OS X has the View option buttons in the windows toolbar. From left to right you can select icon view, list, columns, and coverflow. You may have noticed the window view style doesn’t always persist across Finder windows though, even if you selected “Always Open With _ View” in the View Options. One way to get around that is to change the Finder windows view style default through the command line with the help of defaults.

How to Set the Default Finder View Style to Column, Icon, List, or Cover Flow

Launch Terminal found in /Applications/Utilities/ and use the following defaults write command:

defaults write com.apple.Finder FXPreferredViewStyle xxxx

Change the four ‘xxxx’ letters at the end to the setting you wish to be the default. The Finder view choices are as follows:

Nlsv – List View

icnv – Icon View

clmv – Column View

Flwv – Cover Flow View

For example, to always use list view the defaults command would be as follows:

defaults write com.apple.Finder FXPreferredViewStyle Nlsv

Follow that up with a Finder restart for changes to take effect, achieved by killing the Finder process:

killall Finder

You can also combine the two into a single easy to use command as follows:

If you find these settings to not be consistent across Finder windows, you must remove .DS_Store files from the inconsistent directories. Because the .DS_Store files are prepended with a period they are hidden, making it generally easier to delete them through the command line.

Columns:

Icons:

Once this has been set, the defaults choice will be your new default view type for finder windows, and it’s quite sticky, persisting throughout reboots or new Finder window openings. Thanks to Rob for sending in this tip. If you have any other fancy tricks, do let us know.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

I don’t want that all the windows open with the same view style. I want that any window open with the style I want for it.
I want that by default the windows open with one style.
But that some windows open with another style that I have chosen.
Example:
– default is column view
– but folders with images is Icon view with big icons
– folder with music is list view
– etc.

I have never found a way to do this correctly. If I set a folder to open as Icon view, all the folders that I will open then will open in Icon view…