How to install XAMPP on Linux?


Today I will share with you how we can install XAMPP with which we will support ourselves to be able to set up our own web server on our computer, either to be able to perform internal tests or launch our team as such.

If you are not familiar with XAMPP, let me tell you what this is a package of free software applications that work together in order to act as a web server.

XAMPP is made up of in the database management system MariaDB, the web server Apache and the interpreters for PHP and Perl scripting languages.

Personally, I think this is a simple way to get all this package, which, unlike installing each component separately, is an excellent option for both advanced users and newbies.

Installing XAMPP on Linux

The first step we must take to be able to have XAMPP installed on our system is go to its official website and download the installer that they offer us for Linux in link is this.

Then we will open a terminal and we will give execution permissions to the file that we download, we do it as follows.

Note, at the moment the XAMPP version is 7.2.4-0 so the nomenclature may be different from the one you download, you just have to correct the command by naming the file that you downloaded.

sudo su

chmod +


When executing the installer, an installation wizard will open. where we will give next and accept everything, this if what you require is a regular installation.

If you require a custom installation, you will be the one to change the options offered by the installer to your convenience and need.


At the end of the installer you will already have XAMPP installed on your system.

How to use XAMPP on Linux?

In order to run all the services that make up XAMPP, you can do it by running its manager, with which we can start or stop the service daemons.

You just have to look for his manager in your application menu.

Also if you prefer you can run these services from the terminal, to do this you just have to run the following commands:

For, start XAMPP

sudo /opt/lampp/lampp start

For, stop XAMPP

sudo /opt/lampp/lampp stop

For, restart XAMPP

sudo /opt/lampp/lampp restart

Where is the XAMPP folder?

If you do not know where is the location where you should place your projects to carry out your tests or simply place your web pages and be able to view them from the browser the route is as follows:

/ opt / lampp / htdocs

How to see my web pages created in XAMPP?

One of the most common errors is that they do not place the files inside the indicated folder, in the previous point the route was given, another that usually happens a lot to newbies is that they do not have the Apache or MariaDB daemon started.

If you are only creating in HTML, CSS JavaScript will have no major problem since browsers interpret these languages ​​without major problem.

But if it is PHP is when the problem arises, you just have to make sure that the Apache and MariaDB services are running without problems.

How to view my XAMPP tests in the browser?

If you have already placed your project, try it inside the XAMPP folder and you want to view it in the browser you just have to type in the address bar localhost or

For example:

If you put the file "test.php" in / opt / lampp / htdocs /, in the address bar you write localhost / test.php.

Example 2:

If your project is in /opt/lampp/htdocs/web/index.php, in the address bar you type localhost / web / index.php.

Where is the php.ini file in XAMPP?

This configuration file is often very useful because the configurations that PHP usually comes with are not enough.

To adjust to our need we only have to edit the values ​​of the php.ini that is on the route:


And with this, I believe that they are the most basic concepts of using XAMPP that more than one novice will use.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

6 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Iker said

    Good article. For the next post how to install xdebug and debug php from netbeans.

  2.   Oscar said

    Dear, for service, when installing the xampp program in the Fedora distro, it shows me the following message FLOATING COMMA EXCEPTION ('CORE' GENERATED) and it remains without showing anything in the terminal.
    What would be the solution, please support me.
    Thank you.

  3.   Nelson fernando said

    In Linux Mint it worked as follows:

    chmod 777

    With Chmod + it didn't work

    1.    Tere said

      Hello Nelson, if your question is about Ubuntu, I leave you a tutorial updated to 2021. It helped me a lot, if you follow it step by step you will not have a problem, How to install Xampp on Ubuntu?

    2.    Carlos Acosta said

      Thanks Nelson Fernando, in ubuntu 20.04 it worked the same with 777

  4.   Juan Jose said


    The command to assign permissions after downloading Xampp has an error: There is an x ​​after the + to assign execution permissions and the installation will not be able to be executed.

    The correct way is this:

    chmod + x

    A greeting.