編輯/etc/profile文件 在文件末尾添加兩行代碼 vi /etc/profile CentOS: PATH=$PATH:/opt/lampp/bin export PATH Ubuntu: export PATH=/opt/lampp/bin:$PATH 執行/etc/profile source /etc/profile