The XAMPP stack is an open-source Apache distribution of a PHP development environment consisting of cross-platform software (X): Apache (A), MariaDB (M), PHP (P) and Perl (P).

Developers use the platform as a local host for testing software and webpages before transferring the data to a remote server.

In this guide, you will find simple instructions on how to install XAMPP on Ubuntu 18.04. We also dive into verifying a successful installation and uninstalling the XAMPP package.

tutorial on how to install XAMPP on Ubuntu 18.04


  • Ubuntu 18.04 Bionic Beaver
  • A user with sudo privileges
  • Access to a terminal/command line
  • The apt tool, pre-loaded in Ubuntu and other Debian-based distros

Step 1: Download Installation Package

Before you can install the XAMPP stack, you need to download the package from the official Apache Friends webpage.

Click on the XAMPP for Linux button and Save the file.

download the package from official Apache Friends

Step 2: Make Installation Package Executable

To run the installation process, the file permissions require modification.

To execute a program, you need to make the file executable. Open the terminal (Ctrl+Alt+T) and follow these instructions to do so:

1. Change the directory to the folder where your installation package is located. By default, the system stores it in the Downloads folder. Move to Downloads using the command:

cd /home/[username]/Downloads

changing directory of installation package

2. Now make the file executable by running the command:

sudo chmod 755 [package_name]

If you navigate to the Downloads folder, you can find the complete package name. You need to copy and paste the name into the command above.

downloads folder in XAMPP

To make the latest XAMPP installation package executable, use the command:

sudo chmod 755

3. The terminal does not give any confirmation nor output that you have successfully performed the previous step. However, verify you have executed the permission with the command:

ls –l

The output should include rwxr –xr –x 1 followed by the name of the user who can now execute the file, as in the image below:

executable output including username

Step 3: Launch Setup Wizard

1. Now, you can run the installer and launch the graphical setup wizard with the following command:

sudo ./[package_name]

In this example, the command is:

sudo ./

example of installer run command

2. The XAMPP Setup Wizard opens in a new window on top of the terminal that will appear as in the following image:

screenshot welcome to the XAMPP setup wizard

Step 4: Install XAMPP

Once you see the XAMPP welcome screen, can click through the installation configuration.

1. Click on the Next button and in the following Select Components dialogue, choose the components you want to install. We recommend keeping the default settings and continuing with Next.

select components set of the setup with developer files and core files

2. After selecting the components, the setup wizard will show you the location where it will install the software. To proceed, click Next.

/opt/lampp highlighted in the installation directory

3. The following dialogue box offers to install sponsored applications on top of the XAMPP installation. These include packages such as WordPress, Joomla, Drupal, and others. You can deny installing additional software by unchecking the Learn more about Bitnami for XAMPP box.

setup prompt box

4. Next, the wizard will notify you that it is ready to install XAMPP on your system. Click on Next to start.

setup is now ready to start installing XAMPP

5. This will launch the installation process, and a dialogue box showing the progress will appear on your screen.

welcome to XAMPP setup screen

6. The final dialogue box should display that setup has finished installing. You can complete the process and launch XAMPP by clicking on Finish.

setup has finished installing XAMPP on your computer

Step 5: Launch XAMPP

By clicking on Finish in the previous step, XAMPP launches its control panel that will appear as in the image below.

manage servers tab in XAMPP

Open the Manage Servers tab to see all the available services and their status. You can change their status by clicking on Start or Stop.

View all available services and status

Step 6: Verify XAMPP is Running

Make sure you have successfully installed the XAMPP stack, and everything is running smoothly.

1. Verify the localhost is working by entering the following URL in a browser:


If the XAMPP dashboard page, as in the image below, you have successfully        installed the stack.

successful installation of the XAMPP stack

2. Next, verify MariaDB service is working, open the URL:


The output screen for a properly working database service should appear as:

output properly working MariaDB database

Uninstall XAMPP

1. To uninstall the XAMPP package, return to the terminal and navigate to the opt/lampp directory with the command:

cd /opt/lampp

2. Once you are in the appropriate directory you can uninstall XAMPP by typing the following command:

sudo ./uninstall

3. The command will prompt a dialogue box asking you whether you want to uninstall XAMPP and all of its modules. Confirm by clicking on Yes.

do you want to uninstall XAMPP from Ubuntu

After the process is complete, the output will inform that uninstallation is complete.

successful uninstallation completed

4. Finally, remove the specified directory with:

sudo rm –r /opt/lamp


After reading this article, you will know how to install the XAMPP on Ubuntu 18.04.

This Apache software allows you to set up a free localhost on your system. You can also explore alternative stacks such as the LAMP stack or the MEAN stack.