Meaning of Exit Status 1 Returned by Linux Command

What is meaning of exit status 1 returned by linux command? Like 127 exit status indicates "command not found".

I have visited page, does it mean exit status 1 does not have particular special meaning?

2

3 Answers

The only general convention is that a zero exit status signifies success, whereas any non-zero exit status is a failure.

Many -- but certainly not all -- command-line tools return exit code 1 for syntax error, i.e. you had too few arguments or an invalid option.

Many -- but, alas, not all -- command-line tools have a manual page. By convention, it should document the exit codes of the program, but many do not.

You can see the value of the exit status using man.

Giving an example below:

man ls

Now search for string exit

Adding screen shot below:

2

I had the same exit status now; it's Not Enough Memory in my case. The problem was solved by increasing the swap memory.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest