az is command line tool for Microsoft Azure. To install, see Install Microsoft Azure CLI on Ubuntu.
Once az installed, you need to login. For this, first login to Microsoft Azure on same computer on browser. Open a terminal window, run
az login
Go to the URL and enter the code, it show on the terminal. You get a confirmation message. Now you are logged in and able to use az commands.