Install LAMP on Ubuntu 16.04

Download XAMPP/LAMPP (Linux + Apache + MariaDB + PHP + Perl) from Apache Friends: https://www.apachefriends.org.

Change the permissions to the installer
chmod 755 xampp-linux-[your version type and number goes here]-installer.run

Run the installer
sudo ./xampp-linux-*-installer.run

To start LAMP
sudo /opt/lampp/lampp start

To stop LAMP
sudo /opt/lampp/lampp stop

Graphical tool to manage your servers
cd /opt/lampp
sudo ./manager-linux.run (or manager-linux-x64.run)

Check installation
Type http://localhost in your web browser.

Change ownership of htdocs
sudo chown -R username:username /opt/lampp/htdocs [Replace username with your own username]

Update httpd.conf file
sudo gedit /opt/lampp/etc/httpd.conf

In the file, find the following lines:
User nobody
Group nogroup

Replace nobody with your username and save the file.

Now you can create, delete, and manage files / folder in htdocs folder. To test it, open the opt/lampp/htdocs folder and create some files.

Failure to download extra data files ttf-mscorefonts-installer

There are many suggested solutions to this persistent problem (for example, here and here). None of them worked for me. However, after some trial and error I found a workable solution described here. Just download and install this Debian software package and see if it works for you too.

Here is the link (just in case): http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb.

How to install R and RStudio on Ubuntu 16.04.1 Xenial

    Add R repository

sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list

    Add R to Ubuntu Keyring

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -

    Install R-Base

sudo apt-get update
sudo apt-get install r-base r-base-dev

    Install OpenSSL

sudo apt-get install libcurl4-openssl-dev

    Install RStudio

sudo apt-get install gdebi-core
wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
sudo gdebi -n rstudio-1.0.44-amd64.deb
rm rstudio-1.0.44-amd64.deb

How to verify your Ubuntu 16.04.1 download the easy way

This tutorial explains how to verify your Ubuntu 16.04.1 download manually.

Open a terminal by keyboard shortcut Ctrl + Alt + T and go to the Downloads directory to check your downloaded iso file.

cd Downloads

Then run one of the the following commands from within the download directory.

md5sum ubuntu-16.04.1-desktop-amd64.iso

Or,

sha256sum ubuntu-16.04.1-desktop-amd64.iso

Compare the hash (the alphanumeric string on left) that your machine calculated with the corresponding hash on the UbuntuHashes page: http://releases.ubuntu.com/16.04.1/MD5SUMS or http://releases.ubuntu.com/16.04/SHA256SUMS.

Open the page in your browser and copy the hash your machine calculated from the terminal into the “Find” box in your browser and search for the hash string. If there is a match the downloaded file is intact.

Change hostname permanently from the Terminal without a restart

This quick tutorial explains how to change hostname permanently from the Terminal without a restart in Ubuntu 16.04.1.

Open the Terminal by keyboard shortcut Ctrl + Alt + T.

Show current hostname:
hostname

Set new static hostname:
hostnamectl set-hostname YOUR-HOSTNAME

Restart the system service that manages user logins:
systemctl restart systemd-logind.service

Check new hostname:
hostname