1: Frequently used shortcut commands

  • Ctrl + A: Move to the beginning of the command line
  • Ctrl + E: Move to the end of the command line
  • Ctrl + U: Delete from the cursor to the beginning of the command line

2: Special variables

$? -The exit status or function return value of a command on >
[vagrant@localhost bin]$ echo $?
0

The exit status is an integer value prior to 0 to 255 that is passed back to the shell by the command at the end of the command

Common status code instructions
0 Command runs successfully
1 Generic unknown error
2 Misuse of shell commands
126 Command unexecutable
127 No command found
128 Invalid exit parameter
128+x A serious error with Linux signal X
130 The command terminates with SIGINT (Ctrl+C)
255 Exit status code out of bounds