0

Hi I'm running Redhat Server 7.9 and running into an interesting issue. If I type which perl, I get /bin/perl, but it should be /usr/bin/perl. The same for git.

This same machine would print /usr/ before, but it doesn't know.

Im a little confused, why would this change?

AdminBee
  • 21,637
  • 21
  • 47
  • 71
alpaca28
  • 1
  • 1
  • 3
    On a CentOS 7.9 server, /bin is a symbolic link to /usr/bin. Should be the same on a REL system. the output of `which perl` depends on the order set in your `$PATH`. – doneal24 Sep 21 '21 at 23:17
  • Does this answer your question? [Is there any guarantee that /usr/bin/env will exist?](https://unix.stackexchange.com/questions/111802/is-there-any-guarantee-that-usr-bin-env-will-exist) – Thomas Dickey Sep 21 '21 at 23:52
  • It was the order of $PATH. Thanks! – alpaca28 Sep 22 '21 at 00:10
  • It's better to use `command -v` rather than `which`. `command -v perl` – Nasir Riley Sep 22 '21 at 00:14
  • 1
    If @doneal24 doesn't post an actual answer, please [feel free to do it yorurself](https://unix.stackexchange.com/help/self-answer) so this doesn't keep popping up as Unanswered in the future. – Peregrino69 Sep 22 '21 at 07:17

1 Answers1

0

On a CentOS 7.9 server, /bin is a symbolic link to /usr/bin. Should be the same on a REL system. the output of which perl depends on the order set in your $PATH.

doneal24
  • 4,910
  • 2
  • 16
  • 33