command history

The numbered list of commands you have typed, which bash keeps and saves to a file when the shell exits.

Secrets typed as command arguments are saved in plain text in the history file.

In more detail

The up and down arrows walk through it and the history builtin prints it with numbers. It is written to ~/.bash_history by default, so avoid typing passwords or tokens on the command line.

Example

history 5

Related terms

Taught in

References

Certification courses