Using the following 6 steps install Magento2 on Ubuntu 18.04:

Step 1 – Install LAMP

Step 2 – Install Composer
...