In Terminal, I executed the following lines:

defaults write com.apple.screencapture location ~/Desktop/
killall SystemUIServer

But try as I might, my screenshots never save to the Desktop. In fact, I have no idea where they go!

Here's a GIF demonstrating the problem:

GIF of terminal showing screen capture

Here's a screenshot of my keyboard settings (to show that there are no conflicts or that I'm not accidentally copying to clipboard):

Image of keyboard settings

Does anyone have an idea?

  • What's the result of defaults read com.apple.screencapture location? – Tetsujin Mar 4 '17 at 8:39
  • Your command works in my Sierra without a problem even without killall SystemUIServer. It also works with defaults write com.apple.screencapture location -string "~/Desktop/". The ~ in the plist itself is expanded properly. – klanomath Mar 4 '17 at 19:27
  • @Tetsujin It's /Users/gjtorikian/Desktop/. @klanomath I am glad it works for you. 🙄 – user227555 Mar 4 '17 at 20:26
  • What happens if you change it to somewhere else, test, change it back, test? – Tetsujin Mar 5 '17 at 8:08
  • 1
    Not related to the screenshots, but you are probably going to love adding the F flag to your ls commands. And while you're at it, you can create an alias to save keystrokes: ll is the default alias for ls -alF on Ubuntu installs – jsejcksn Jun 22 '17 at 3:14

Assuming that you are running the latest version of macOS, with iCloud Drive activated and the "Desktop & Documents Folders" option selected, the ~/Desktop is no longer your regular desktop folder, as it's synchronized with iCloud.

My suggestion: drag any file from your desktop to a terminal window, and it will show the full path for the file in the desktop folder.

Hope it helps.


You can revert the screenshot save location to default (desktop) by removing the location key in the plist file. Just use the following Terminal command:

defaults delete com.apple.screencapture location; killall SystemUIServer

If that doesn't solve the issue, then there might be another aspect of your plist file that is corrupt, or another issue is present. As an alternative, you can just trash your current plist file completely and then reapply any adjustments to the defaults that you desire.


Just pointing out that "Terminal and bash... are a part of the overall OS" has zero to do with it. Shell expansions happen before command execution, so the defaults binary never sees the tilde, that's all.

I'm not where I can check, but I wonder if it's more that you have the trailing slash on it for some reason?

Lastly... don't they default to the desktop anyway?


The problem you are having is that the OS doesn't understand the ~ shortcut. That's only a shell shortcut.

Set the location to the absolute path:

defaults write com.apple.screencapture location /Users/<username>/Desktop/ (replacing <username> with your username)

This should fix your problem.

  • Yes the OS understands what ~ means when using defaults write com.apple.screencapture location ~/Desktop/ and what's written to the file is: location = "/Users/name/Desktop/" because it's expanded before it gets written to the file and why it shows as location = "/Users/name/Desktop/" when using defaults read com.apple.screencapture location to confirm! After all, Terminal and bash, the macOS default shell, are a part of the overall OS. – user3439894 Mar 4 '17 at 10:34

You must log in to answer this question.