From the course: Linux: Shells and Processes

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Shell history tricks

Shell history tricks

- [Narrator] Using the shell's history can keep you from having to type in commands over again. If you just want to bring up the last command, you may want to use the up and down arrow keys. The up and down arrow keys recall previous lines. Each time you press up, you go back one line on your history, recalling each command. At any time you can press Enter and run the command. If you want to see a list of commands that you've typed, use the history command. The history command shows the most recent commands. The number of commands it remembers depends on the value stored in the HISTSIZE shell variable. Let's run the history command to see which commands we've run. Type into a terminal history and hit Enter. What you will see will change depending on how many commands you've run on your system. Each line will be numbered and the history command will show the most recent commands at the bottom. If you want to run a specific…

Contents