How to start XAMPP automatically in Ubuntu

sudo  /opt/lampp/lampp start
sudo gedit /etc/init.d/lampp

screenshot-from-2017-02-28-155822

#!/bin/bash
/opt/lampp/lampp start

save and close the file

sudo chmod +x /etc/init.d/lampp
sudo update-rc.d lampp defaults

restart the system
xampp would be start automatically. You can check it by opening http://localhost in browser
you can also verify it by opening http://localhost/phpmyadmin