42.2k views
0 votes
What command is used to determine the path of an executable file?

1) which
2) where
3) wexec
4) cannot be determined

User ArtBIT
by
8.1k points

1 Answer

5 votes

Final answer:

The command 'which' is used to determine the path of an executable file in Unix-like operating systems by searching the directories in the PATH environment variable.

Step-by-step explanation:

The command used to determine the path of an executable file in Unix-like operating systems is which. When you type which, followed by the name of a command or executable, it will search in the directories listed in the PATH environment variable for that executable, and if found, it will return the full path to the executable file. This is useful for determining which version of a program will be executed when you have multiple versions installed, or to verify that a command is available on the system.

User Andrew Kashpur
by
7.9k points