0

The home(~) folder in my MacBook Pro is getting heavily cluttered by dotfiles. Is there any way I can neatly organise them.

I would like to group related dotfiles together(.eg. .bashrc .bash_profile .bash_history --> .bash folder). And all the dotfolders into a single directory like .config or .dotfiles.

How can I implement this without breaking anything if possible?

1 Answers1

1

You can do that with symbolic links. If you move your dotfiles to .dotfiles directory, you can then create a symlink in your home directory for each file. For example if you moved .zprofile to the .dotfiles directory, you would create the symlink with:

ln -s ~/.dotfiles/.zprofile .
Janne
  • 56
  • 7
  • Additionally, you can turn that `~/.dotfiles` directory into a Git repo to track your changes. I like using a tool called Dotbot that will do your symlinking for you. – whatsthatitspat May 27 '21 at 15:58