nerdexam
Linux_Foundation

LFCS · Question #733

What is the purpose of the Bash built-in export command?

The correct answer is D. It sets up environment variables for applications. The Bash export command is used to mark an environment variable to be passed to child processes.

Submitted by saadiq_pk· Apr 18, 2026Essential Commands

Question

What is the purpose of the Bash built-in export command?

Options

  • AIt allows disks to be mounted remotely.
  • BIt runs a command as a process in a subshell.
  • CIt makes the command history available to subshells.
  • DIt sets up environment variables for applications.
  • EIt shares NFS partitions for use by other systems on the network.

How the community answered

(50 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    2% (1)
  • D
    92% (46)

Why each option

The Bash `export` command is used to mark an environment variable to be passed to child processes.

AIt allows disks to be mounted remotely.

Exporting disks for remote mounting typically involves services like NFS or Samba, not the Bash `export` command.

BIt runs a command as a process in a subshell.

Running a command in a subshell is done by enclosing the command in parentheses `(command)` or using `bash -c 'command'`, not by the `export` command.

CIt makes the command history available to subshells.

The command history is managed by the shell itself and can be configured through variables like `HISTFILE` or `HISTSIZE`, but `export` does not make it directly available to subshells.

DIt sets up environment variables for applications.Correct

The `export` command makes environment variables available to subsequently executed commands within the current shell and to any child processes or subshells that are spawned from it. This ensures applications or scripts executed in subshells inherit these specific environment settings.

EIt shares NFS partitions for use by other systems on the network.

Sharing NFS partitions is handled by the NFS server daemon and configured in `/etc/exports`, not by the Bash `export` command.

Concept tested: Bash shell environment variables, export command

Source: https://www.gnu.org/software/bash/manual/bash.html#index-export

Topics

#export command#environment variables#Bash#shell built-ins

Community Discussion

No community discussion yet for this question.

Full LFCS Practice