As per the title why isn't there a alternative to XAMPP which completely installs in Linux
The default stack on Ubuntu (or any Linux system) is LAMP and it has been for a very long time.
Ubuntu has a special program to install extra sets of software (like LAMP); you can install it with
and then choose from a list of options LAMP:
The system will install a pre-configured version of LAMP and will also ask for password for MySQL admin. This has worked out of the box for me for years
Besides that: please avoid using XAMP since the LAMP stack in Ubuntu is better tested and hardend.