How to run the program on Linux
1. chmod space "x" space your sh file name (x is A whole, do not take it apart).
2. Enter "./your sh file name" to execute.
Example:
1 chmod x helloworld.sh.
2 ./helloworld.sh.
First of all, you need to give the file executable permissions. For example, if your file is a.sh, then you can chmod x a.sh; and then run the file.
When running in this way, a.sh is in the current working directory. If the file is not in the current directory, then you need to use an absolute path to execute, such as: /opt/a.sh; /opt/test/a.sh .
Recommended: Getting started with Linux system
The above is the detailed content of How to run programs in linux. For more information, please follow other related articles on the PHP Chinese website!