How to Install XAMPP on Ubuntu 20.04

In this article, we will have explained the necessary steps to install and configure XAMPP on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

XAMPP is a free and open-source web server package developed by Apache Friends. The XAMPP software package comprises the Apache web server, MariaDB database server, PHP, and Perl. It is basically a localized LAMP server that gives developers a suitable environment to test websites and applications before uploading them to a production server. XAMPP also comes with Bitnami, which allows you to install content management systems, such as WordPress, as well as other apps on top of your XAMPP installation if you choose.

Install XAMPP on Ubuntu 20.04

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

sudo apt update
sudo apt upgrade

Step 2. Install XAMPP on the Ubuntu system.

Run the following commands to download and install XAMPP on your system:

### For PHP 8.3 ###
wget https://www.apachefriends.org/xampp-files/8.0.3/xampp-linux-x64-8.0.3-0-installer.run

### For PHP 7.4 ###
wget https://www.apachefriends.org/xampp-files/7.4.16/xampp-linux-x64-7.4.16-0-installer.run

### For PHP 7.3 ###
wget https://www.apachefriends.org/xampp-files/7.3.27/xampp-linux-x64-7.3.27-1-installer.run

Now make XAMPP an executable file using a chmod command and check whether permission is changed or not:

chmod +x xampp-linux-*-installer.run

After the making executable file now we will start the actual installation process:

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

The moment you run the installation command, a XAMP setup wizard will open. Click on the Next button:

Install XAMPP on Ubuntu 20.04

Next, select components to install, it is recommended to leave it as default:

Install XAMPP on Ubuntu 20.04

Then, you will be informed of the location where the XAMPP setup is going to be installed:

Install XAMPP on Ubuntu 20.04

Here the installation process is started:

Install XAMPP on Ubuntu 20.04

After completing the installation click on Finish to complete the setup:

Install XAMPP on Ubuntu 20.04

Step 3. Launch XAMPP through the Terminal.

In order to launch XAMPP through your Ubuntu Terminal, enter the following command as root:

sudo /opt/lampp/lampp start

Verify Installation:

http://localhost.com

That’s all you need to do to install XAMPP on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on XAMPP, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.