ruk·si

Command History

Updated at 2016-01-07 01:07

One of the most important "commands" when working with Unix:

Ctrl + R and start typing.
This will search your command history for past executions.
Press Ctrl + R again to jump to the next found command.

This command utilizes your command history, history.

history
# to see past commands as a list

history | grep foreman
# to find a past command

# ! executes first found history command with the identifier
echo hello
!echo

You can increase your history limit.

# to increase your history size
HISTFILESIZE=1000000000
HISTSIZE=1000000