How to install XAMPP on Linux/Ubuntu?

XAMPP is a cross-platform local server and highly recommended server if you want to run PHP and MYSQL based projects. So today we are going to see how to install XAMPP on Linux/Ubuntu system.

Step 1: Download XAMPP package

XAMPP is provided by apache so visit their official website to download the XAMPP Linux package.  You can follow this link to go to the apache website and download XAMPP.

Click on “XAMPP for Linux” and it will be downloaded in a few minute.

Step 2: Open the terminal and go to the Downloads directory.

Now open the terminal, in order to open a terminal you can search for terminal or use shortcut (CTRL + Alt + T), now go to the Downloads directory to access this package.

Type this command to connect directly inside the Downloads folder or you can go inside your Downloads folder and open the terminal there.

cd /home/{your username}/Downloads

Step 3: Change the permission of the package.

If the downloaded package is not executable, in order to make it executable run the following command

chmod 755 {package name}


Step 4: Execute the .run file to install XAMPP

Now it is executable so our next step is to run the package. To do that run the following command:

sudo ./{package name}

Step 5: Go through the setup wizard.

Now the setup wizard would prompt up and all we need to do is press next until it starts the installing packages. Once the installation is done click on the finish button.

Step 6: Run XAMPP server and Verify the installation

Now the installation on XAMPP is done the next question is how to start the XAMPP server. To do that open your terminal again and run the following command

sudo /opt/lampp/lampp start

Now to check that server is running open any browser and type the following URL,

http://localhost

Additional notes

If you ever want to stop server just run,

sudo /opt/lampp/lampp stop

You can also restart the server by running following command,

sudo /opt/lampp/lampp restart

That’s all about how to install XAMPP on Linux/Ubuntu .