nerdexam
Linux_Foundation

LFCS · Question #461

A user complained that programs started from his shell won't use his favorite editor. Which of the following files should you edit to change this?

The correct answer is B. .bashrc. To set a user's preferred editor for programs launched from their shell, the user's ~/.bashrc file is the correct configuration location.

Submitted by daniela_cl· Apr 18, 2026User and Group Management

Question

A user complained that programs started from his shell won't use his favorite editor. Which of the following files should you edit to change this?

Options

  • A.editor
  • B.bashrc
  • C.bash_rc
  • D~/bash.conf

How the community answered

(44 responses)
  • A
    7% (3)
  • B
    86% (38)
  • C
    2% (1)
  • D
    5% (2)

Why each option

To set a user's preferred editor for programs launched from their shell, the user's `~/.bashrc` file is the correct configuration location.

A.editor

`.editor` is not a standard shell configuration file used for setting a preferred editor.

B.bashrcCorrect

The `~/.bashrc` file is executed by Bash for interactive non-login shells, making it the appropriate place to set environment variables like `EDITOR` or `VISUAL` for user-specific preferences.

C.bash_rc

`.bash_rc` is a common misspelling; the correct file name for user Bash configuration is `.bashrc`.

D~/bash.conf

`~/bash.conf` is not a standard configuration file that Bash automatically sources.

Concept tested: User-specific Bash shell configuration

Source: https://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files

Topics

#shell configuration#environment variables#user profiles#text editors

Community Discussion

No community discussion yet for this question.

Full LFCS Practice