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 HTML and CSS: Design and Build Websites

HTML and CSS: Design and Build Websites

  • BOOST SALES WITH STUNNING HTML CSS WEBSITE DESIGNS!
  • SECURE PACKAGING ENSURES SAFE DELIVERY FOR CUSTOMERS.
  • PERFECT GIFT OPTION FOR ASPIRING WEB DESIGNERS!
BUY & SAVE
$14.22 $29.99
Save 53%
HTML and CSS: Design and Build Websites
2 Kaisi Professional Electronics Opening Pry Tool Repair Kit with Metal Spudger Non-Abrasive Nylon Spudgers and Anti-Static Tweezers for Cellphone iPhone Laptops Tablets and More, 20 Piece

Kaisi Professional Electronics Opening Pry Tool Repair Kit with Metal Spudger Non-Abrasive Nylon Spudgers and Anti-Static Tweezers for Cellphone iPhone Laptops Tablets and More, 20 Piece

  • COMPLETE 20-PIECE KIT FOR ALL YOUR DEVICE REPAIR NEEDS.

  • DURABLE STAINLESS STEEL AND NYLON TOOLS FOR LONG-LASTING USE.

  • INCLUDES CLEANING CLOTH FOR PERFECT SCREEN FINISH POST-REPAIR.

BUY & SAVE
$9.99 $11.89
Save 16%
Kaisi Professional Electronics Opening Pry Tool Repair Kit with Metal Spudger Non-Abrasive Nylon Spudgers and Anti-Static Tweezers for Cellphone iPhone Laptops Tablets and More, 20 Piece
3 iFixit Prying and Opening Tool Assortment - Electronics, Phone, Laptop, Tablet Repair

iFixit Prying and Opening Tool Assortment - Electronics, Phone, Laptop, Tablet Repair

  • DIY FRIENDLY: EFFORTLESSLY OPEN AND REPAIR ALL YOUR TECH DEVICES!
  • ALL-IN-ONE KIT: COMPLETE SET OF TOOLS FOR EVERY ELECTRONICS REPAIR.
  • UNIVERSAL COMPATIBILITY: PERFECT FOR IPHONES, PCS, SMARTWATCHES, AND MORE!
BUY & SAVE
$9.95
iFixit Prying and Opening Tool Assortment - Electronics, Phone, Laptop, Tablet Repair
4 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
$9.99
FULL STACK WEB DEVELOPMENT: Everything Beginners to Expert Guide on Modern Full-Stack Web Development Using Modern Web Development Tools
5 STREBITO Electronics Precision Screwdriver Sets 142-Piece with 120 Bits Magnetic Repair Tool Kit for iPhone, MacBook, Computer, Laptop, PC, Tablet, PS4, Xbox, Nintendo, Game Console

STREBITO Electronics Precision Screwdriver Sets 142-Piece with 120 Bits Magnetic Repair Tool Kit for iPhone, MacBook, Computer, Laptop, PC, Tablet, PS4, Xbox, Nintendo, Game Console

  • COMPLETE SET: 120 BITS & 22 ACCESSORIES FOR ALL DIY & REPAIR NEEDS.

  • ERGONOMIC DESIGN: COMFORT GRIP HANDLE WITH SWIVEL TOP ENHANCES USAGE EASE.

  • EFFICIENT ORGANIZATION: MAGNETIC MAT KEEPS SCREWS IN PLACE FOR HASSLE-FREE REPAIRS.

BUY & SAVE
$27.99
STREBITO Electronics Precision Screwdriver Sets 142-Piece with 120 Bits Magnetic Repair Tool Kit for iPhone, MacBook, Computer, Laptop, PC, Tablet, PS4, Xbox, Nintendo, Game Console
6 Flask Web Development: Developing Web Applications with Python

Flask Web Development: Developing Web Applications with Python

BUY & SAVE
$35.60 $55.99
Save 36%
Flask Web Development: Developing Web Applications with Python
7 JavaScript and jQuery: Interactive Front-End Web Development

JavaScript and jQuery: Interactive Front-End Web Development

  • MASTER JAVASCRIPT & JQUERY WITH CLEAR EXPLANATIONS AND VISUALS.
  • LEARN CORE PROGRAMMING CONCEPTS THROUGH INSPIRING EXAMPLES.
  • EASY-TO-FOLLOW DIAGRAMS SIMPLIFY COMPLEX TOPICS FOR ALL LEARNERS.
BUY & SAVE
$14.39 $39.99
Save 64%
JavaScript and jQuery: Interactive Front-End Web Development
8 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
9 iFixit Jimmy - Ultimate Electronics Prying & Opening Tool

iFixit Jimmy - Ultimate Electronics Prying & Opening Tool

  • VERSATILE TOOL: PERFECT FOR TECH REPAIRS AND HOUSEHOLD PROJECTS.

  • PRECISION CONTROL: ERGONOMIC HANDLE FOR ACCURATE DISASSEMBLY TASKS.

  • LIFETIME WARRANTY: TRUSTWORTHY FOR DIYERS AND PROFESSIONAL REPAIRS.

BUY & SAVE
$7.95
iFixit Jimmy - Ultimate Electronics Prying & Opening Tool
10 Fixinus 10 Pieces Universal Triangle Plastic Pry Opening Tool for iPhone Mobile Phone Laptop Table LCD Screen Case Disassembly Blue Guitar Picks

Fixinus 10 Pieces Universal Triangle Plastic Pry Opening Tool for iPhone Mobile Phone Laptop Table LCD Screen Case Disassembly Blue Guitar Picks

  • VERSATILE USE FOR SMARTPHONES, TABLETS, AND SENSITIVE DEVICES.
  • SCRATCH-RESISTANT DESIGN PROTECTS YOUR VALUABLE INSTRUMENTS.
  • LIGHTWEIGHT, PORTABLE TOOLS PERFECT FOR ON-THE-GO REPAIRS.
BUY & SAVE
$5.99
Fixinus 10 Pieces Universal Triangle Plastic Pry Opening Tool for iPhone Mobile Phone Laptop Table LCD Screen Case Disassembly Blue Guitar Picks
+
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.