nerdexam
Linux_Foundation

LFCS · Question #800

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

The correct answer is A. .bash_history. The Bash shell stores a user's command history in the .bash_history file, which is located in their home directory.

Submitted by layla.eg· Apr 18, 2026Essential Commands

Question

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

Options

  • A.bash_history
  • B.bash_histfile
  • C.history
  • D.bashrc_history
  • E.history_bash

How the community answered

(60 responses)
  • A
    92% (55)
  • B
    2% (1)
  • D
    5% (3)
  • E
    2% (1)

Why each option

The Bash shell stores a user's command history in the `.bash_history` file, which is located in their home directory.

A.bash_historyCorrect

The `.bash_history` file, typically found in a user's home directory (`~/.bash_history`), is the default location where the Bash shell saves a record of previously executed commands.

B.bash_histfile

`.bash_histfile` is not the standard or default filename used by Bash for storing command history.

C.history

While `.history` might be used by other shells (like `csh` or `tcsh`), it is not the default history file for Bash.

D.bashrc_history

`.bashrc_history` is not the standard or default filename for Bash history; `.bashrc` is a configuration file.

E.history_bash

`.history_bash` is not the standard or default filename used by Bash for storing command history.

Concept tested: Bash history file location

Source: https://www.gnu.org/software/bash/manual/bash.html#History-Expansion

Topics

#Bash history#Shell configuration#User files

Community Discussion

No community discussion yet for this question.

Full LFCS Practice