No deb packages have been released yet for Ubuntu 18.04, so you have to use the script MS provided here. However, you will face the following error immediately:
fatal error: Python.h: No such file or directory
To resolve this, simply install the python-dev package:
sudo apt install python-dev
Then run the script normally:
curl -L https://aka.ms/InstallAzureCli | bash
Once done, exit the terminal and open a new one.
That’s it! Enjoy!