0

When given a binary in a terminal, you can launch it via

sh myapp

or

./myapp

Are there any other ways to launch the app? Is there any difference between sh and ./ ? What do they denote/stand for?

marked as duplicate by muru, Eliah Kagan, Mitch Apr 4 '15 at 6:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Also, you can't launch binaries using sh myapp, shell scripts can be run that way. – muru Apr 4 '15 at 6:14
1

There are differences between them.

Let's look at the first one:

sh myapp

It opens myapp in sh. The command may not work with binaries as muru said.

Let's look at the second one:

./myapp

It tells the shell to open myapp. The shell gets the app set as preferred and then sends to the application command to open the app.

I remember that the sh way doesn't require executive rights. (may someone who is sure confirm?)

Not the answer you're looking for? Browse other questions tagged or ask your own question.