Bash Tutorial for Beginners #5: Exit Status $? Explained | 0, 1, 2 & 127
Practical Dev Lab
0:00 / 0:00
Bash Tutorial for Beginners #5: Exit Status $? Explained | 0, 1, 2 & 127
19 просмотров · 2 недели назад
Practical Dev Lab
30 подписчиков
19 просмотров · 2 недели назад
What is exit status in Bash? In this beginner-friendly Linux Bash tutorial, we explain how Bash uses exit status to determine whether a command succeeded or failed.
In this video, you'll learn:
What is exit status in Bash?
What does the $? variable mean?
Why 0 means success
Why non-zero values mean failure
What exit status 1 can mean
What exit status 2 can mean
Why Bash commonly uses 127 for “command not found”
How to check the exit status of a command
Practical examples using ls
How $? changes after each command
#Linux #Bash #LinuxForBeginners #BashScripting #LinuxTutorial #LinuxCommands #ShellScripting #ExitStatus #BashProgramming #LinuxBasics