I am trying to install nix on my local iMac. I am following the following Guide to do that. After executing

sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume

I get "Installing finished!" and I am requested to add the line:

. /Users/joeblogs/.nix-profile/etc/profile.d/nix.sh

"to your shell profile (e.g. ~/.profile)."

I am using a Mac (with zsh) and so what file is this shell profile referring to? For instance, i do not have a ~/.profile.

  • You'd have an easier time installing on a Linux machine. Try Linux mint. Jul 25, 2021 at 13:26

2 Answers 2


I had the same problem. Try creating a file named .bash_profile in your user directory (/Users/joblogs/.bash_profile) and add the given line as it is written. Restart the terminal and give it a go.

  • this does't work, maybe because i am using zsh
    – codeasasin
    Jul 24, 2021 at 7:11

So the following worked. Go to the following file:


and add the following line:

. /Users/thanhdanhphan/.nix-profile/etc/profile.d/nix.sh

Close all your terminals and re-open a new one, try:

nix --version

and it should give you the latest nix version e.g (at the time of writing):

nix (Nix) 2.3.14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.