Skip to main content
Linux AdministrationMediumSingle Choice

Linux Administration Question

Statement

Which of the following files, located in the user home directory, is used to store the Bash history?

#bash_history#histfile#history_command#bashrc
A

.bash_history

Correct
B

.bash_histfile

C

.history

D

.bashrc_history

E

.history_bash

Resolution & Explanations

The Bash shell stores command history in a file specified by the HISTFILE environment variable. By default, HISTFILE is set to ~/.bash_history in the user's home directory. This file is read at the start of a session and appended to during the session, allowing users to recall previous commands using history or arrow keys.