nerdexam
LPI

010-150 · Question #12

Which function does a shell program serve?

The correct answer is C. It receives user commands and executes them. A shell is a command-line interpreter that acts as the primary interface between the user and the operating system by accepting and executing commands.

Exercise Leadership and Client Education

Question

Which function does a shell program serve?

Options

  • AIt provides a graphical environment.
  • BIt is responsible for establishing a connection to another computer.
  • CIt receives user commands and executes them.
  • DIt is responsible for logging a user into the system.

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    4% (1)
  • C
    84% (21)
  • D
    4% (1)

Why each option

A shell is a command-line interpreter that acts as the primary interface between the user and the operating system by accepting and executing commands.

AIt provides a graphical environment.

Providing a graphical environment is the function of a display server and desktop environment (such as X11 or Wayland with GNOME/KDE), not a shell.

BIt is responsible for establishing a connection to another computer.

Establishing connections to other computers is handled by networking tools and protocols such as SSH, Telnet, or network daemons - not by the shell itself.

CIt receives user commands and executes them.Correct

A shell program reads commands entered by the user (or from a script), interprets them, and passes them to the operating system kernel for execution. It serves as the interactive command interpreter layer, managing processes, I/O redirection, pipelines, and environment variables on behalf of the user.

DIt is responsible for logging a user into the system.

Logging a user into the system is the responsibility of the login program and PAM (Pluggable Authentication Modules), not the shell, which starts after authentication is complete.

Concept tested: Shell program role and function

Source: https://www.gnu.org/software/bash/manual/bash.html#What-is-a-shell_003f

Topics

#shell program#command execution#Linux shell#user interface

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice