Atom Dotfiles Symlink breaks Atom


I don’t know much, so sorry if this an idiotic question. I moved all my dotfiles from my home directory to ~/Dotfiles/, and then put symlinks in the home directory pointing to ~/Dotfiles/ . So, ~/atom is a symlink pointing to ~/Dotfiles/.atom. But now when I try to open atom, it shows

What does this mean? Can I fix it, or do I have to get rid of the symlink and move .atom back to the home directory?


You have to have a real folder called .atom/ in your home directory, yes, and there’s a good reason why.

I don’t know exactly what your workflow looks like, but I know that people who have symlinked dotfiles tend to be doing it for ease of backup/syncing. Well, the .atom/ folder contains configuration files, but it also contains every package you’ve installed, and their node_modules/, and cached compiled code for faster loading. You don’t want to have all that junk in your Dropbox or wherever.

Here’s what I think you should do. Delete the symlink and allow Atom to create a real .atom/, then create symlinks for styles.less, config.cson, keymap.cson, github.cson, and snippets.cson, plus any storage files created by packages you’ve installed.


Hmm, okay. So, out of curiosity so I can learn more about how Atom works, what’s the reason that there has to be a folder (and not a symlink) called .atom in the home directory? What causes the error when it’s a symlink?


Based on the screenshot you posted? Permissions for the compile-cache/ folder.


Ohh, okay, I see now. Thank you!


I don’t know enough to say whether there’s a way around that, but it’s definitely tidier for your backups to not include the compile-cache/ and dozens of node_modules/ (if you’ve ever manually copied or deleted a Node project, you’ll have a memory of how long the OS takes to handle tens of thousands of tiny files).

If you do want to sync your packages, the best way is to install a package (package-sync) that writes the package list out to an external file, then back up that file with your dotfiles.