Linux system errors
Exit Code 127
Reviewed for reference consistency: August 11, 2026
shell command or executable binary not found
What 127 Means
The 127 error on the Linux system errors indicates exit code 127 — shell command or executable binary not found. This typically occurs due to requested command not present in system path directories.
Exit code 127 is a standardized POSIX shell return status indicating that the shell or subshell attempted to execute a command, script, or binary that could not be located in the current environment's PATH search directories.
How to fix 127
General informational guidance, not professional advice. Commands can affect your system or data — back up first and proceed at your own risk. FixerCode is an independent reference, not affiliated with any vendor mentioned.
Confirm the command can be found
Use the shell's command lookup to see whether the name resolves in the current environment.
command -v gitInspect the active PATH
A command may work interactively but fail in cron, CI, or service environments because PATH is shorter there.
printf '%s\n' "$PATH"Use an explicit local path
If the executable is in the current directory, call it with a relative path so the shell does not search PATH.
./script.shCheck the script interpreter line
A file can exist and still return 127 if its shebang points to an interpreter path that is not present on the system.
head -n 1 ./script.sh
Technical Background
When a shell receives a command name without an explicit path (like 'node' or 'gcc'), it sequentially searches every directory listed in the $PATH environment variable. If none of the directories contain an executable matching that name, the shell returns exit code 127.
Exit code 127 is distinct from exit code 126. Code 126 indicates that the file was found but lacks executable permissions, whereas 127 means the file could not be found at all.
Common Causes
- Requested command not present in system PATH directories
- Typographical error in binary name or script invocation
- Script referencing a missing interpreter or broken shebang path
- Missing dynamic shared library dependencies required to execute the binary
Typical Scenarios
- A CI/CD pipeline step fails when attempting to invoke an uninstalled CLI utility
- A shell script fails with 'command not found' due to a corrupted PATH environment variable
- A Docker container build aborts when a script references a missing binary
What to Know
Exit code 127 confirms that the requested command was not located. Verifying the command spelling, binary installation, and $PATH configuration resolves the execution failure.
Frequently Asked Questions
Common questions about Linux 127 error
The PATH environment variable might be configured differently across different shell sessions, users, or automated environments like cron jobs.
Yes. If you attempt to execute a script that starts with a shebang (e.g., #!/bin/node) and that specific interpreter does not exist on the system, the shell will report command not found.
When a script is saved with Windows line endings (CRLF), the Linux shell interprets the carriage return as part of the interpreter's name (like bash\r). Since no such file exists, it returns a 127.
Related Error Codes
Related Errors From Other Categories
Similar error codes documented across different platforms and systems
You have unresolved file conflicts preventing Git from completing the current operation.
You tried to add a remote named 'origin', but one with that name already exists.
Git does not know which remote branch should receive your pushed commits.
You checked out a specific commit, detaching your working directory from the branch history.