Run the command below first:
sudo nano /etc/systemd/system/xampp.serviceIf you have gedit, you can use gedit instead of nano
Copy and paste the code below into the text editor and save
[Unit]
Description=XAMPP
[Service]
ExecStart=/opt/lampp/lampp start ExecStop=/opt/lampp/lampp stop
Type=forking
[Install]
WantedBy=multi-user.targetNow run the command below to check the service status.
systemctl status xampp.serviceIf it’s not running you can start the service like below:
systemctl start xamppYou can use stop instead of start if you’d like stop xampp service, then start with start command.
And when you want to restart xampp (restarts both apache and mysql) you can run:
systemctl restart xamppThat’s all.


Leave a Reply