其实很简单 XAMPP中执行命令存放在/opt/lampp/bin中,所以只要在/etc/profile中添加
/etc/profile
PATH=$PATH:/opt/lampp/bin export PATH
即可 然后执行以下source
source /etc/profile