Linux desktop VM on Azure Tutorial
This page explains how to setup a Mate desktop on Azure Linux VM.
I prefer Linux MATE desktop environment compared to GNOME 3 for performance reason in particular with remote display(less animations and chrome).
Update (03/26 2021): you can provision an Ubuntu Linux version 20.04. In that case, just go to Step #6 Intall Mate Desktop
Quickstart: Create a Linux virtual machine in the Azure portal
check the current version of Linux
lsb_release -a
Type the following apt command to upgrade the installed packages:
sudo apt update
sudo apt list --upgradable
sudo apt upgrade
sudo reboot
Run the following to remove the unused old kernels:
sudo apt --purge autoremove
Make sure you install update-manager-core package After updating Ubuntu server, run the commands below to install update-manager-core if it is not already installed.
sudo apt install update-manager-core
Execute the following command:
sudo do-release-upgrade
Please note if you may be greeted with the following message: Checking for a new Ubuntu release There is no development version of an LTS available. To upgrade to the latest non-LTS develoment release set Prompt=normal in /etc/update-manager/release-upgrades. In that case, pass the -d option to get the latest supported release forcefully:
sudo do-release-upgrade -d
Check the Linux version:
lsb_release -a
See How to Install MATE Desktop in Ubuntu Linux
Choose LightDM instead of GDM3
sudo apt update && sudo apt upgrade -y
sudo apt install ubuntu-mate-desktop
sudo apt-get -q=2 -y install xrdp
sudo service xrdp restart
Docker Install Commands :
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
ignore the error about public key could not be validated.
sudo apt update
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER} #run docker as SUDO without typing sudo all the time, make sure to log out and login again to SSH
Ubuntu 20.04 (Focal Fossa) and 20.10 (Groovy Gorilla) include an azure-cli package with version 2.0.81 provided by the universe repository. This package is outdated and not recommended. If this package is installed, remove the package before continuing by running the command sudo apt remove azure-cli -y && sudo apt autoremove -y.
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
sudo snap install --classic code # or code-insiders
More information here: Visual Studio Code on Linux - Installation
sudo apt install git-all
az aks install-cli
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
MobaXTerm is a powerfull remote access software
On Linux VM configuration, add network port rule to open the RDP protocol with a minimal IP range (use your own public IP instead of ‘Any’) Add RDP rule
For a more convinient access add a Static IP to the VM Add IP addresses Then instead of using the IP address which could change at every desallocation you’ll able to use a dns name like ‘mylinuxworkstation.westeurope.cloudapp.azure.com’