Find location of bash command binary file [duplicate]

I have a command letsencrypt which I use in the terminal.

I tried to find the binary via grep -R "letsencrypt" /. Not a good idea, some sort of loop was invoked.

Is there a simple command to see what the command letsencrypt actually invokes for binary?

1

2 Answers

You can use which letsencrypt or type letsencrypt.

You can locate programs, scripts and symbolic links, that are in $PATH (and executed without the total or relative path) with the following command line

which program-name # general
which letsencrypt # your example

If letsencrypt is a script, you can view it with a text viewer, for example less or your favorite editor.

less /path-found-by-which/letsencrypt

You Might Also Like