Ubuntu Linux install Gnome desktop on server

Originally published at: https://www.cyberciti.biz/faq/ubuntu-linux-install-gnome-desktop-on-server/

I installed Ubuntu Linux 16.04 LTS / 18.04 LTS / 18.10 server operating system with RAID support. I need to run a Gnome desktop too. How do I install Gnome desktop on the server after installation using the CLI?