Skip to content

Latest commit

 

History

History
101 lines (70 loc) · 2.79 KB

BashCliSetup.md

File metadata and controls

101 lines (70 loc) · 2.79 KB

Setup environment

Windows

You can install Azure CLI 2.0 with the MSI and use it in the Windows command-line, or you can install the CLI with apt-get on Bash on Ubuntu on Windows.

MSI for the Windows command-line

To install the CLI on Windows and use it in the Windows command-line, download and run the msi.

Note

When you install with the msi, az component isn't supported. To update to the latest CLI, run the msi again.

To uninstall the CLI, run the msi again and choose uninstall.

apt-get for Bash on Ubuntu on Windows

  1. If you don't have Bash on Windows, install it.

  2. Open the Bash shell.

  3. Modify your sources list.

echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
  1. Run the following sudo commands:
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
sudo apt-get install apt-transport-https
sudo apt-get update && sudo apt-get install azure-cli
  1. Run the CLI from the command prompt with the az command.

Note

When you install with apt-get, az component isn't supported. To update the CLI, run sudo apt-get update && sudo apt-get install azure-cli again.

To uninstall, run sudo apt-get remove azure-cli.

  1. Create private keypair ssh-keygen -t rsa -b 4096

install and update azure cli on mac

brew update && brew install azure-cli

brew upgrade azure-cli

install and configure kubectl

https://kubernetes.io/docs/tasks/tools/install-kubectl/

az aks install-cli 
brew install kubernetes-cli
brew upgrade kubernetes-cli

Install autocompletion

kubectl completion -h

install the preview cli

az extension add --name aks-preview

remove existing installation of preview cli

az extension remove --name aks-preview

install

https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/kube-ps1 https://github.com/jonmosco/kube-ps1 PROMPT=$PROMPT'$(kube_ps1) ' source "/usr/local/opt/kube-ps1/share/kube-ps1.sh"

https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/usr/local/share/zsh-syntax-highlighting/highlighters

ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#999999,bg=cyan,bold,underline"

https://github.com/zsh-users/zsh-autosuggestions

bindkey '^ ' forward-word bindkey '^ ' end-of-line