How many ways can run linux programs? What are the differences?
There are three ways to run linux programs, which are:
1. Make the file executable and run the file directly.
The chmod command modifies the permissions of the file. + x gives the file executable permissions. Just like we run the program above. But the results we see are somewhat different from what we imagined.
2. Directly call the command interpreter to execute the program.
As shown in the following figure:
Since our interpreter is / bin/sh, we use the sh command interpreter to execute the program.
3. Use source to execute files.
The above are the details of how to run the Linux program, please pay attention to other related articles!