Quantcast
Channel: A Shiny New Me
Viewing all articles
Browse latest Browse all 42

zsh: command not found az

$
0
0

While trying to install the Azure CLI on OSX, I ran into this error after the installation completed…

zsh: command not found az

This all has to do with your shell, and admittedly, I’m confused by bash profiles. Profiles are simply files that your terminal loads to setup your environment. Normally, these are located in a file called ~/.bash_profile. This happens to be the same file that the Azure CLI tries to write to by default at the very end of the install.

However, if you are using Oh My Zsh, your shell is different and is loading a different profile. The whole point of zsh is to create a “dot file” (these files that begin with . are called Dot Files) that contains a bunch of neat tweaks and setup hacks for directory auto-completion, GitHub help and what not. That means Zsh does NOT load the standard ~/.bash_profile.

In order to get the CLI to work, you need the install to write to ~/.zshrc. So when the last prompt comes up and asks where you profile is, you enter ~/.zshrc instead of taking the default.

If you are confused about whether your shell is launching on the Zsh profile, you can run echo $SHELL.

As an added bonus, if you ever want to see ALL the dot files in your profile directory, you can simply run ls -a ~/


Viewing all articles
Browse latest Browse all 42

Latest Images

Trending Articles





Latest Images