Use wget to download the latest XAMPP from https://www.apachefriends.org/index.html.
wget https://www.apachefriends.org/xampp-files/8.1.2/xampp-linux-x64-8.1.2-0-installer.run
And then make the installation package executable.
sudo chmod 755 xampp-linux-x64-8.1.2-0-installer.run
And here, you have to confirm execute permission.
ls -l xampp-linux-x64-8.1.2-0-installer.run
Conduct to launch the Setup Wizard.
sudo ./xampp-linux-x64-8.1.2-0-installer.run
When properly the graphical setup wizard opens, let's go step by step to install XAMPP. Now, what you need to aunch XAMPP through the Terminal.
sudo /opt/lampp/lampp start