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.
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)- A8% (2)
- B4% (1)
- C84% (21)
- D4% (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.
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.
Establishing connections to other computers is handled by networking tools and protocols such as SSH, Telnet, or network daemons - not by the shell itself.
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.
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
Community Discussion
No community discussion yet for this question.