7

I am new on MacOS, would like to set a default folder to open Finder, instead of Recent items folder.

I tried:

defaults write com.apple.finder NewWindowTargetPath -string "file:///Users/path/to/folder"

But didn't worked...

Is there a way to do it?

2 Answers 2

5

Finder → Preferences (⌘,) → General and set ‘New Finder windows show’, either pick from the list or choose Other and specify a custom path.

You don't need to set the key manually using Terminal, but you should be able to with this:

defaults write com.apple.finder NewWindowTargetPath -string "file://localhost/Users/path/to/folder/"

Note the trailing slash at the end and the use of localhost, both of which are how Finder writes the key itself.

1
  • Monterey (might be true of Big Sur too) doesn't need the localhost. This is how I set mine to ~/Downloads defaults write com.apple.finder NewWindowTargetPath -string "file://$HOME/Downloads/"
    – jaygooby
    Commented Mar 4, 2022 at 9:35
10

A couple of quick things that may help if you are looking to set Desktop or Documents as the default for Finder...

Set Desktop as Default:

defaults write com.apple.finder NewWindowTarget -string "PfDe"

Set Documents as Default:

defaults write com.apple.finder NewWindowTarget -string "PfDo"
4
  • 1
    And the home folder is "PfHm"
    – Vojtěch
    Commented Nov 5, 2020 at 13:56
  • This should be the accepted answer.
    – Vojtěch
    Commented Nov 5, 2020 at 13:56
  • This is the correct answer, confirm to work on latest MacOS 13.4.1
    – daisy
    Commented Aug 19, 2023 at 2:25
  • Still works on macOS 14.0
    – Farski
    Commented Oct 6, 2023 at 12:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .