Which Linux command is used to permanently set an environment variable? MCQ with Answer and Explanation

Which Linux command is used to permanently set an environment variable?
A. export in /etc/profile
B. export in .bashrc
C. setenv
D. All of the above
Answer: Option D
Solution (By JKExamLibrary)
Environment variables can be set in shell startup files (.bashrc, .profile, /etc/profile) using export.

This question belongs to: Computer Operating Systems

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1 Report Error
Which component of a process contains its local variables, function parameters, and return addresses during execution?
A. Data Section
B. Stack
C. Heap
D. Code Section

Correct Answer: Option B


Explanation:
The stack segment of a process manages temporary execution details like active function call parameters, local variables, and instruction return paths.

This question belongs to: Computer Operating Systems
Question #2 Report Error
What is the purpose of the Windows 'Safe Mode with Networking'?
A. To start Windows with all drivers but no network
B. To load the last known good configuration
C. To start Windows with minimal drivers plus network support for troubleshooting
D. To boot into a command prompt only

Correct Answer: Option C


Explanation:
Safe Mode with Networking adds network drivers so users can access the internet or network shares while troubleshooting.

This question belongs to: Computer Operating Systems
Question #3 Report Error
Which structural concept describes a situation where a lower-priority process holds a resource needed by a higher-priority process, stalling execution?
A. Aging Process
B. Thrashing Cycle
C. Context Switching Delay
D. Priority Inversion

Correct Answer: Option D


Explanation:
Priority Inversion occurs when a low-priority task holds a resource required by a high-priority task, causing the high-priority task to wait indirectly.

This question belongs to: Computer Operating Systems