The shell that I normally use is zsh.I have several aliases to enable color in some programs such as ls and grep.I've also set my custom path so that I can execute programs in non-standard place (such as in ~/bin/).. As of macOS 10.6 Catalina, Apple has made the zsh shell the default shell, previously it was the bash shell. alias gopath='export GOPATH=$(pwd)' You could also escape the $ explicitly with \, while still using double quotes:. I won't change root's shell to zsh, but I would like to share these setting so that root can have it as well.I find out that zsh is not sourcing /etc/profile. I open my ~/.zshrc in my favorite editor with ec and source it (apply the current state of ~/.zshrc to your ZSH session) with sc. # Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can be placed here, though oh-my-zsh # users are encouraged to define aliases within the ZSH_CUSTOM folder. Platform specific aliases in ZSH Use Aliases To Edit and Reload .zshrc . The c2z script checks your csh setup, and produces a list of zsh # # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" pollCommand alias gopath="export GOPATH=\$(pwd)" This comes in handy if you want to expand some parts during definition and others when using the alias. Typing alias lists all of your current aliases. For this to work, you can copy and paste the code on the bottom of your.zshrc file and you are good to go. With globbing (a Zsh feature), you can list files with a particular extension. To avoid expansion of $(pwd) when defining the alias, you can use single quotes instead of double quotes:. The alias … c2z can convert most aliases to zsh format without any problems. I have two aliases in my ~/.zshrc, which are super-efficient. However, if you're using some really arcane csh tricks, or if you have an alias with a name like do (which is reserved in zsh), you may have to fix some of the aliases by hand. To make aliases of macOS Unix commands in your bash or zsh shell on macOS and earlier versions, it is done via your .bash_profile or .zsh file which lives in your home account directory, if the file does not already exist, just create one. # For a full list of active aliases, run `alias`. There is a function created by Pat Regan to expand the global alias which uses globalias function provided by zsh. And this works only for the global alias set with capital letters.