XAMPP is a cross-platform development environment consisting of Apache, MariaDB, PHP, and Perl. Using XAMPP on an Ubuntu Desktop reduces the installation effort and time for developers. Instead of resolving conflicts between different components of a development stack, developers can focus on their work. The lite version of XAMPP can also be installed if one wants to use MySQL and PHP only. XAMPP uses MariaDB, a drop-in replacement for MySQL, although all the MySQL commands will also work here.

XAMPP also facilitates the installation of commonly used WordPress, Drupal, Joomla, and other applications using Bitnami.

XAMPP can be easily installed with the default installer provided by the official website. It works on almost all major Linux distributions. In this guide, we will see how to install XAMPP on an Ubuntu 20.04 LTS system. Let’s dive into the installation procedure. XAMPP requires that you have an Ubuntu Desktop installed.


  • Ubuntu 20.04 OS (Desktop) should be installed on your system.
  • Access to the internet.
  • Superuser access for the current user.

Step 1. Download the XAMPP installer from the official website. Be sure to select only the installer corresponding to Linux:

<img alt="Xampp install" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/1.png6086fd9856eba.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="375" loading="lazy" src="data:image/svg xml,” width=”750″>

As you can see this XAMPP version comes with PHP 8.0.3. If you are working with an old PHP version, you can also download the XAMPP installer for that particular PHP version from here.

Step 2. After downloading the installer, navigate to the download folder and open up a terminal there.

Step 3. Now we need to give proper permission to the installer to make it executable:

sudo chmod 755 xampp-linux-x64-8.0.3-0-installer.run

The above command will give the read and write permission for every user and execute permission only for the owner. You can verify the permission of the file with the ‘ls -l’ command.

<img alt="Make the XAMPP Installer executable" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/2.png6086fd98bde97.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="176" loading="lazy" src="data:image/svg xml,” width=”750″>

Step 4. We are now ready to launch the installer. The below command will launch the graphical wizard for installing XAMPP.

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

Step 5. In the very first window of setup you will see a welcome message from XAMPP, just click ‘next’ to continue:

<img alt="Run XAMPP Installer" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/3.png6086fd995c2f3.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="524" loading="lazy" src="data:image/svg xml,” width=”750″>

Step 6. In the subsequent window, select the components to install. By default, both the ‘XAMPP Core Files’ and ‘XAMPP Developer Files’ are selected. We recommend to use the default approach and press the next button:

<img alt="Choose components" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/4.png6086fd99f34c2.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="431" loading="lazy" src="data:image/svg xml,” width=”511″>

Step 7. The Installer will now display the installation directory which is usually ‘/opt/lampp’ on Linux systems:

<img alt="Choose folder" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/5.png6086fd9a695f2.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="436" loading="lazy" src="data:image/svg xml,” width=”501″>

Step 8. In the next window, the installer will describe the bitnami modules for XAMPP. Just continue by hitting next:

<img alt="Apps for Xampp" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/6.png6086fd9adec20.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="438" loading="lazy" src="data:image/svg xml,” width=”508″>

Step 9. Once the above steps are completed, the setup will display the message “Setup is now ready to install XAMPP on your computer”. Click next to proceed:

<img alt="Start installation" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/7.png6086fd9b71845.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="433" loading="lazy" src="data:image/svg xml,” width=”516″>

Step 10. The installer will unpack the files and start the installation process as shown here:

<img alt="Installation Progress" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/8.png6086fd9c34275.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="440" loading="lazy" src="data:image/svg xml,” width=”505″>

Step 11. You will see a completion message for the installation process in the end. If you want to start the XAMPP now, check the ‘Launch XAMPP’ label and press the finish button:

<img alt="Launch XAMPP" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/9.png6086fd9cda64f.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="439" loading="lazy" src="data:image/svg xml,” width=”509″>

Step 12. Another way to start XAMPP is to use the command:

sudo /opt/lampp/lampp start

Similarly, to stop XAMPP, use the above command as:

sudo /opt/lampp/lampp stop

Step 13. After clicking the finish button in the above step, a graphical manager for XAMPP will be launched:

<img alt="XAMM is running" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/10.png6086fd9db1d32.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="474" loading="lazy" src="data:image/svg xml,” width=”671″>

We can use the Manage Servers tab to start and stop various XAMPP services:

<img alt="Manage Servers" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/11.png6086fd9e533ce.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="470" loading="lazy" src="data:image/svg xml,” width=”679″>

When you close the XAMPP window after installation, you will find it hard to start the graphical interface for XAMPP although you can use the command in Step 12 to start and stop the XAMPP services. Now to start XAMPP gui, use the below command:

sudo /opt/lampp/manager-linux-x64.run

<img alt="XAMPP manager" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/12.png6086fd9ed00fd.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="581" loading="lazy" src="data:image/svg xml,” width=”680″>

To create a desktop shortcut for the XAMPP gui, follow the steps below:

i) Create a new file called as xampp.desktop using the below command:Advertisement

gedit ~/Desktop/xampp.desktop

ii) Now put the following content to this file and then close it after saving it:

#!/usr/bin/env xdg-open

[Desktop Entry]



Exec=sh -c "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY sudo /opt/lampp/manager-linux-x64.run"




iii) Now go to the desktop window and right-click the xampp icon. Here select the option ‘Allow Launching’:

<img alt="Launch XAMPP" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/13.png6086fd9f6c82e.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="408" loading="lazy" src="data:image/svg xml,” width=”405″>

iv) After the above step the Xampp icon will appear in place of the previous icon. Right-click the XAMPP icon and select the option ‘open’:

<img alt="Open XAMPP" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/14.png6086fda061ef5.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="355" loading="lazy" src="data:image/svg xml,” width=”403″>

v) You’ll need to enter the superuser password to see the main XAMPP window as shown here:

<img alt="Authenticate as admin" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/15.png6086fda0d00ab.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="384" loading="lazy" src="data:image/svg xml,” width=”413″>

Now we can control the XAMPP from the below window:

<img alt="XAMPP 8 started" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/16.png6086fda148e44.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="475" loading="lazy" src="data:image/svg xml,” width=”676″>

Testing the XAMPP Setup

To verify if the XAMPP is correctly installed, go to the URL http://localhost/dashboard. If everything is configured correctly, you will see the below page:

<img alt="XAMPP test page" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/04/echo/17.png6086fda1c87db.jpg" ezimgfmt="rs rscb3 src ng ngcb3" height="261" loading="lazy" src="data:image/svg xml,” width=”750″>


So we have successfully installed XAMPP on Ubuntu 20.04. It is very easy to install XAMPP on Ubuntu as compared to Windows. XAMPP is only meant for testing purposes of a workload. It is not secure to deploy a XAMPP application in a production environment. This is because it has many security potholes for making the development flexible. Once a XAMPP project has passed the testing stage, it can be easily transferred to a live production system.