Red Hat Certified System Administrator RHCSA · Free Practice Question Medium

Question 42

How can you modify the Bash history settings in Red Hat Enterprise Linux 9 to ensure that it retains the last 1000 commands that have been executed?

Show model answer

In RHEL 9, to configure Bash history to store the last 1000 commands, edit the .bashrc file in your home directory. Add or modify the following lines:

HISTSIZE sets the number of commands to remember in the current session, and HISTFILESIZE sets the maximum number of lines in the history file. After editing, save the file and restart your terminal for the changes to take effect.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need