I've installed the nginx-light package on debian, but I can't find the executable. It's not in /usr/bin, like it says on the official nginx website. Where is it, then?

  • execute in your terminal whereis nginx – user3566929 Feb 1 '16 at 3:47
  • @user3566929 doesn't show anything, just nginx: – markasoftware Feb 1 '16 at 3:49
  • maybe you typed it wrong as the output is supposed to be this nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx /usr/share/man/man1/nginx.1.gz – user3566929 Feb 1 '16 at 3:53
  • oh, I was ssh'd into a server with nginx installed, but I was running the command on my local machine accidentally. When I run it on the actual server I get the correct output. – markasoftware Feb 1 '16 at 3:56

To get a list of all the files installed by a package, you can use

dpkg -L <package_name>

In your case

dpkg -L nginx-light

will list all the files installed by the package. Look at that list to know where the executable has been installed. Also, if you know the executable's name beforehand, you can filter the list of files with grep:

dpkg -L nginx-light | grep '.*/nginx$'

Replace nginx above by the actual name of the nginx executable.

  • This is probably the better answer, but the other one is more to the point – markasoftware Feb 1 '16 at 3:49
  • @Markasoftware agreed (on both counts :) ). I deliberately made my answer generic in the hope that it would work in more general situations. – Joseph R. Feb 1 '16 at 3:50

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