Non-zero exit status code 127 in Linux

Jun 18, 2023 · 1 min read · Post a comment

As with most nonzero exit status codes, they indicate that the program or command encountered an error or an exceptional condition during its execution. So, what does 127 means then?!


  • Linux


Exit status code 127 is commonly used in to indicate that the command or program requested to be executed was not found. When you execute a command in a terminal or shell, the shell searches for the corresponding executable file in the directories listed in the PATH environment variable. If the shell cannot find the command, it returns an exit status code of 127.

This status code can occur for few reasons, including:

  • The command or program is not installed on the system. Not available in your Docker image.
  • The command or program is not available in the dirs listed in the PATH variable.
  • Typo.


In case you face any issues, feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.