How to create a .zprofile on your macOS

A standard OS X installation will not build a .zprofile for you.This is a must-have, if you wish to run functions from the command line.

  1. Open the Terminal in your Mac.
  2. Type "cd ~/" to go to your home folder.
  3. Type "touch .zprofile" to create your new file.
  4. Type “open .zprofile” to open it in default text editor.
  5. Or if you wish you can edit .zprofile with your favourite editor ( type "open -e .zprofile" to open it in TextEdit).
      • -e                  Opens with TextEdit.
      • -t                   Opens with default text editor.
      • ~/                   Opens with default text editor.
  6. Type "source .zprofile" to reload .zprofile and update any functions you add.If this command will give you an error then try this one “source ~/ .zprofile”.

                  Comments

                  Post a Comment

                  Popular posts from this blog

                  n - Interactively Manage Your Node.js Versions on macOS