Definition:

How to read synopsis?

  • bold text type exactly as shown.
  • italic text replace with appropriate argument.
  • [-abc] any or all arguments within [ ] are optional.
  • -a|-b options delimited by | cannot be used together.
  • argument … argument is repeatable.
  • [expression] … entire expression within [ ] is repeatable.

1. Introduction

2. Definitions

3. Basic shell features

4. Bash shell builtin command

5. Shell variables

6. Bash features

..

9. Using History Interactively

  • history command
  • When the shell starts up, the history is initialized from the file named by the HISTFILE variable (default ~/.bash_history)
  • run history to see the command history and !nb (ex: !2) to execute that command
  • !! is last command
    • ex: forgot to sudo, rerun with sudo !!