Skip to main content
ubuntuask.com

Back to all posts

How to Install XAMPP In Ubuntu?

Published on
6 min read
How to Install XAMPP In Ubuntu? image

Best Web Development Tools to Buy in October 2025

1 Web API Development with ASP.NET Core 8: Learn techniques, patterns, and tools for building high-performance, robust, and scalable web APIs

Web API Development with ASP.NET Core 8: Learn techniques, patterns, and tools for building high-performance, robust, and scalable web APIs

BUY & SAVE
$47.99 $54.99
Save 13%
Web API Development with ASP.NET Core 8: Learn techniques, patterns, and tools for building high-performance, robust, and scalable web APIs
2 FULL STACK WEB DEVELOPMENT: Everything Beginners to Expert Guide on Modern Full-Stack Web Development Using Modern Web Development Tools

FULL STACK WEB DEVELOPMENT: Everything Beginners to Expert Guide on Modern Full-Stack Web Development Using Modern Web Development Tools

BUY & SAVE
$35.00
FULL STACK WEB DEVELOPMENT: Everything Beginners to Expert Guide on Modern Full-Stack Web Development Using Modern Web Development Tools
3 HTML and CSS: Design and Build Websites

HTML and CSS: Design and Build Websites

  • MASTER HTML & CSS TO CREATE STUNNING WEBSITES EFFORTLESSLY!
  • SECURE PACKAGING ENSURES YOUR PURCHASE ARRIVES SAFELY AND INTACT.
  • PERFECT AS A UNIQUE GIFT FOR ASPIRING WEB DESIGNERS AND DEVELOPERS!
BUY & SAVE
$10.78 $29.99
Save 64%
HTML and CSS: Design and Build Websites
4 JavaScript and jQuery: Interactive Front-End Web Development

JavaScript and jQuery: Interactive Front-End Web Development

  • MASTER JAVASCRIPT & JQUERY WITH CLEAR EXAMPLES AND DIAGRAMS!
  • LEARN CORE PROGRAMMING CONCEPTS EFFORTLESSLY AND INSPIRINGLY.
  • BOOST YOUR CODING SKILLS WITH EASY-TO-FOLLOW, ENGAGING CONTENT!
BUY & SAVE
$14.16 $39.99
Save 65%
JavaScript and jQuery: Interactive Front-End Web Development
5 Learning React: Modern Patterns for Developing React Apps

Learning React: Modern Patterns for Developing React Apps

BUY & SAVE
$36.49 $65.99
Save 45%
Learning React: Modern Patterns for Developing React Apps
6 Web Development and Design for Beginners: Learn and Apply the Basic of HTML5, CSS3, JavaScript, jQuery, Bootstrap, DOM, UNIX Command and GitHub - Tools For Building Responsive Websites

Web Development and Design for Beginners: Learn and Apply the Basic of HTML5, CSS3, JavaScript, jQuery, Bootstrap, DOM, UNIX Command and GitHub - Tools For Building Responsive Websites

BUY & SAVE
$22.97
Web Development and Design for Beginners: Learn and Apply the Basic of HTML5, CSS3, JavaScript, jQuery, Bootstrap, DOM, UNIX Command and GitHub - Tools For Building Responsive Websites
7 Functional Web Development with Elixir, OTP, and Phoenix: Rethink the Modern Web App

Functional Web Development with Elixir, OTP, and Phoenix: Rethink the Modern Web App

BUY & SAVE
$28.00 $45.95
Save 39%
Functional Web Development with Elixir, OTP, and Phoenix: Rethink the Modern Web App
8 Building DIY Websites For Dummies

Building DIY Websites For Dummies

BUY & SAVE
$21.09 $29.99
Save 30%
Building DIY Websites For Dummies
9 Web Design with HTML, CSS, JavaScript and jQuery Set

Web Design with HTML, CSS, JavaScript and jQuery Set

  • TWO-BOOK SET FOR COMPREHENSIVE LEARNING IN WEB DESIGN.
  • VISUAL FORMAT SIMPLIFIES COMPLEX TECHNOLOGIES FOR BEGINNERS.
  • IDEAL FOR ASPIRING WEB DESIGNERS AND FRONT-END DEVELOPERS.
BUY & SAVE
$36.19 $58.00
Save 38%
Web Design with HTML, CSS, JavaScript and jQuery Set
10 Full Stack Web Development For Beginners: Learn Ecommerce Web Development Using HTML5, CSS3, Bootstrap, JavaScript, MySQL, and PHP

Full Stack Web Development For Beginners: Learn Ecommerce Web Development Using HTML5, CSS3, Bootstrap, JavaScript, MySQL, and PHP

BUY & SAVE
$35.00
Full Stack Web Development For Beginners: Learn Ecommerce Web Development Using HTML5, CSS3, Bootstrap, JavaScript, MySQL, and PHP
+
ONE MORE?

To install XAMPP in Ubuntu, you need to follow these steps:

  1. Download XAMPP: Visit the official Apache Friends website (https://www.apachefriends.org/index.html) and download the XAMPP package for Linux. Make sure you select the appropriate version for your Ubuntu system.
  2. Open Terminal: Launch the Terminal by pressing Ctrl+Alt+T or by searching for "Terminal" in the Ubuntu Applications menu.
  3. Navigate to Downloads folder: In the Terminal, use the cd command to navigate to the directory where you downloaded the XAMPP package. Typically, it is the "Downloads" folder.
  4. Make the installer executable: Run the following command to make the XAMPP installer executable: chmod +x xampp-linux-x64-XXXX-installer.run (replace XXXX with the version number).
  5. Run the installer: Execute the XAMPP installer by entering the command sudo ./xampp-linux-x64-XXXX-installer.run in the Terminal (replace XXXX with the version number). You need to use the sudo command to run it with root privileges.
  6. Follow the installer prompts: The XAMPP installer will guide you through the installation process. You may need to press Enter to scroll through the license agreement and then provide your password when prompted.
  7. Choose the installation directory: During the installation, you will be prompted to select the installation directory for XAMPP. You can choose the default location or select a different one according to your preference.
  8. Complete the installation: After selecting the installation directory, the installation process will continue. It may take a few minutes to complete. Once finished, you will see a success message.
  9. Start XAMPP: To start XAMPP, use the command sudo /opt/lampp/lampp start in the Terminal. This will initialize the Apache web server and MySQL database.
  10. Verify the installation: Open your web browser and type localhost into the address bar. If everything is installed correctly, the XAMPP homepage should appear.

That's it! You have successfully installed XAMPP on your Ubuntu system. You can now use XAMPP to develop and test your web applications locally.

What is the default document root in XAMPP for Ubuntu?

The default document root in XAMPP for Ubuntu is "/opt/lampp/htdocs".

How do I uninstall XAMPP completely from Ubuntu?

To uninstall XAMPP completely from Ubuntu, you can follow these steps:

  1. Stop all XAMPP services by opening a terminal and running the following command:

sudo /opt/lampp/lampp stop

  1. Once the services are stopped, you can remove XAMPP files by running the following command:

sudo rm -rf /opt/lampp

  1. Delete the XAMPP launcher files by running the following command:

sudo rm -rf /usr/share/applications/xampp-control-panel.desktop sudo rm -rf /usr/share/icons/hicolor/48x48/apps/xampp.png

  1. Remove any XAMPP-related entries from the default Path environment variable using the following command:

sudo sed -i '/\/opt\/lampp/d' /etc/environment

Note: This step is optional if you manually added XAMPP to your PATH variable.

  1. Finally, update your environment variables by running the command:

source /etc/environment

That's it! XAMPP should be completely uninstalled from your Ubuntu system.

What are the default file permission settings for XAMPP?

The default file permission settings for XAMPP may vary depending on the operating system on which it is installed.

On Windows, the default file permission settings for XAMPP are usually set to allow full control and access to all files and folders within the XAMPP installation directory. This means that the owner, group, and other users have read, write, and execute permissions by default.

On Linux, the default file permission settings for XAMPP are usually set to 755 for directories and 644 for files. This means that the owner has read, write, and execute permissions, while the group and other users have only read and execute permissions.

Can I install XAMPP using the software center in Ubuntu?

No, you cannot install XAMPP directly from the software center in Ubuntu. XAMPP is not available as a package in the Ubuntu software repositories. However, you can download the XAMPP installer from the official Apache Friends website (https://www.apachefriends.org/index.html) and install it manually.

How do I configure the SMTP settings in XAMPP to send emails?

To configure the SMTP settings in XAMPP to send emails, you need to follow these steps:

  1. Locate the php.ini file: In XAMPP, open the xampp folder. Go to the php folder. Look for the php.ini file.
  2. Open the php.ini file in a text editor.
  3. Search for the [mail function] section in php.ini.
  4. Configure the SMTP settings: Uncomment the following lines by removing the semicolon (;) at the beginning: ;extension=openssl ;extension=exif (Remove the ; before extension=openssl and extension=exif) Add or update the following settings: SMTP = smtp.gmail.com (or your preferred SMTP server) smtp_port = 587 (or the appropriate port for your SMTP server) sendmail_from = your-email@gmail.com (or your sending email address) For example: SMTP = smtp.gmail.com smtp_port = 587 sendmail_from = your-email@gmail.com Set the following settings if you are using Gmail SMTP: smtp_ssl = auto smtp_auth = true smtp_username = your-email@gmail.com smtp_password = your-gmail-password For example: smtp_ssl = auto smtp_auth = true smtp_username = your-email@gmail.com smtp_password = your-gmail-password
  5. Save the php.ini file.
  6. Restart the Apache server in XAMPP.

Now, when you send emails using the mail() function in your PHP code, XAMPP will use the configured SMTP server to send the emails.

What is XAMPP and what is its purpose?

XAMPP is a free, open-source cross-platform web server solution that stands for Apache, MariaDB (formerly MySQL), PHP, and Perl. It provides a complete software package that includes all the necessary components to set up a local web development environment.

The purpose of XAMPP is to simplify the installation and configuration of a web server, database server, and other related tools required for developing and testing websites or web applications locally. It allows developers to work on their projects offline without the need for an internet connection, making it a suitable solution for building and testing websites on personal computers.

XAMPP provides a user-friendly interface that allows developers to manage and control the various components of their development stack easily. It includes an Apache web server, MySQL/MariaDB database server, PHP, Perl, and other tools such as phpMyAdmin for database administration.

Overall, XAMPP simplifies the process of setting up a local web server environment, making it easier for developers to create, test, and debug their web projects before deploying them to a production server.

How can I increase the PHP memory limit in XAMPP?

To increase the PHP memory limit in XAMPP, you need to follow these steps:

  1. Locate the php.ini file: In XAMPP, the php.ini file is usually located in the "xampp\php" folder.
  2. Open the php.ini file in a text editor.
  3. Search for the "memory_limit" directive.
  4. Change the default value (usually 128M) to the desired value: For example: memory_limit = 256M, memory_limit = 512M, etc.
  5. Save the php.ini file and close the text editor.
  6. Restart the Apache server: In XAMPP, you can do this by clicking on the "Stop" button, then the "Start" button next to the Apache module in the XAMPP Control Panel.
  7. Verify the new memory limit: You can check the new PHP memory limit by creating a PHP script that outputs the current memory limit using the ini_get("memory_limit") function.

That's it! The PHP memory limit in XAMPP should now be increased according to your desired value.