Which Linux command is used to display the current environment variables? MCQ with Answer and Explanation

Which Linux command is used to display the current environment variables?
A. env
B. All of the above
C. set
D. printenv
Answer: Option B
Solution (By JKSSB Mock Tests)
env, printenv, and set all display environment variables; set also shows shell variables.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Operating Systems Questions

Question #1
In a symmetric multiprocessing (SMP) system, how are the processing responsibilities shared among available CPUs?
A. One primary CPU controls all other slave CPUs and handles all hardware input/output exclusively.
B. Only one processor can be active at any given minute while others stay idle.
C. Processors are restricted to executing only application software, never OS tasks.
D. All processors share the same physical memory space and run tasks simultaneously under equal peer status.

Correct Answer: Option D


Explanation:
In Symmetric Multiprocessing (SMP), multiple peer processors share a common main memory and execute threads concurrently under equal standing.

This question belongs to: Computer Operating Systems
Question #2
What mechanism does an operating system use to simulate an environment where multiple processes run concurrently on a single CPU core by switching between them rapidly?
A. Asymmetric Multiprocessing
B. Defragmentation Scaling
C. Direct Memory Mapping
D. Time-Slicing (via Context Switching)

Correct Answer: Option D


Explanation:
Time-slicing leverages rapid, scheduled context switching to give users the illusion of smooth, concurrent application execution on a single core.

This question belongs to: Computer Operating Systems
Question #3
Which file allocation method stores blocks of a file in an ordered sequence linked together via pointers, eliminating external fragmentation but making random access slow?
A. Indexed Allocation
B. Direct Directory Mapping
C. Contiguous Allocation
D. Linked Allocation

Correct Answer: Option D


Explanation:
Linked allocation chains blocks together using pointers, allowing dynamic size expansions but requiring linear scanning to read a specific internal offset.

This question belongs to: Computer Operating Systems