How to install XAMPP on Ubuntu 20.04

XAMPP is a free, open source web server package developed by Apache Friends. The XAMPP software package includes the Apache web server, MariaDB database server, PHP and Perl. It’s basically a localized LAMP server that gives developers a convenient environment to test websites and applications before uploading them to a production server.

The acronym XAMPP stands for: X – cross-platform, A – Apache server, M-MariaDB, P – PHP and P – Perl. XAMPP can be run on Windows, macOS and all Linux distributions.

This guide shows you how to Install XAMMP At Ubuntu 04/20.

Step 1: Update Ubuntu System

To start with, you should make sure that all packages are up to date.

First update the package index, enter:

$ sudo apt update 

Now download the latest package version and install it with:

$ sudo apt upgrade 

Step 2: Download XAMPP on Ubuntu 20.04

When you are done updating your system’s packages, go to the XAMPP Downloads page and get the latest version of XAMPP. Choose the correct installer for XAMPP according to the PHP version installed on your system.

to Check the PHP version Run the command on your system:

$ php -v

After setting up the PHP version on your system, download the installer that corresponds to the PHP version on your system as follows:

For PHP 7.4:

$ wget

For PHP 7.3:

$ wget

For PHP 7.2:

$ wget

For my case, I chose the first option because I have PHP 7.4.3 on my system. Now let’s move on to the next step.

Step 3: Install XAMPP on Ubuntu 20.04

The installation program should now be in your current working directory. You must first give it execute permissions before you can run it to install XAMMP.

To assign execute permissions, use the chmod command as follows:

$ sudo chmod a+x

Next, run the installer Script to install XAMPP on your Ubuntu machine

$ sudo ./

The XAMMP setup window will appear as shown. Click ‘Next“To start the installation process.

Install XAMMP on Ubuntu 20.04
XAMMP initial setup

Next, select the components you want to install and click ‘Next‘Button.

Install XAMPP on Ubuntu 20.04
Select the components to be installed

The next step shows you where XAMMP will be installed. Just click on ‘Next’ to go to the next step.

Xampp installation path

XAMMP will begin installing, so please give it some time.

Install XAMMP on Ubuntu 20.04
xampp installation is running

Finally click on “Finish” to complete the installation. Before that, you can use the ‘Start XAMMP‘to start XAMMP automatically.

complete installation of xammp
complete installation of xammp

After clicking the ‘End’ Button displays the welcome page as shown.

xampp welcome page
xampp welcome page

To manage the core services (Apache web server, MariaDB database & ProFTPD) click on the ‘Manage Server’ tab. In the right section you will find options for starting, stopping and restarting the services.

Manage services in XAMMP
Manage services in XAMMP

Step 4: check if XAMPP is running

By default, the Apache web server and phpMyAdmin are the only active components. To access the phpMyAdmin page, browse the URL shown.


The standard page shows you existing databases that are supplied with the setup.

Step 5: Stop / start the XAMPP server

To stop all running services on XAMMP, call the command:

$ sudo /opt/lampp/lampp stop

To start the services, do the following:

$ sudo /opt/lampp/lampp start

Run the following commands to remove XAMMP from your system:

$ cd  /opt/lampp
$ sudo  ./uninstall


In this tutorial we learned how to install XAMPP in Ubuntu 20.04. XAMPP makes it easy to test your applications and mimick a real-world situation where your applications are hosted on a production server for clients to interact with.