how to run a php script in terminal linux code example Example: run shell script from php file echo shell_exec('sh /home/scripts/fix-perm.sh');