Home »
Aptitude Questions and Answers »
Linux Aptitude Questions and Answers
Linux Environment Variables Aptitude Questions
Linux Environment Variables Aptitude Questions: This section contains aptitude questions and answers on Linux Environment Variables.
Submitted by Nidhi, on April 28, 2020
This section contains Aptitude Questions and Answers on Linux Environment Variables.
1) There are the following statements that are given below, which of them are correct about environment variables in Linux operating system?
- The environment variables are used to store some values that can be used by the application.
- The environment variables are used to customize the behavior of the applications.
- The environment variables can impact the performance of the system.
- The environment variable used a % symbol for variables.
Options:
- A and B
- C and D
- A, B, and C
- B, C, and D
Correct answer: 3
A, B, and C
Statements A, B, and C are correct about environment variables.
2) The scope of an environment variable can be?
- Local
- Global
- Both
- None
Correct answer: 3
Both
The scope of an environment variable can be local or global.
3) Which symbol is used with the environment variable name?
- #
- @
- &
- $
Correct answer: 4
$
The dollar ($) symbol is used with the environment variable name.
4) There are the following options that are given below, which of them are the correct environment variable used in the Linux operating system?
- SHELL
- TERM
- PATH
- HOME
Options:
- A and B
- C and D
- A, C, and D
- A, B, C, and D
Correct answer: 4
A, B, C, and D
All given options are the correct environment variable used in the Linux operating system.
5) There are the following options that are given below, which of them are not correct environment variables used in the Linux operating system?
- USERID
- ENV
- EDITOR
- USER
Correct answer: 1
USERID
The USERID is not the correct environment variable used in the Linux operating system.
6) There are the following statements that are given below, which is correct about the SHELL environment variables in Linux operating system?
- This environment variable is used to execute shell scripts.
- This environment variable contains the path of shell which is being used by the user.
- This environment variable contains the path of the compiler which is used for shell script compilation.
- This environment variable is set by default with the username.
Correct answer: 2
This environment variable contains the path of shell which is being used by the user.
The SHELL environment variable contains the path of shell which is being used by the user.
7) Which of the following environment variables contains the path of the user's unique id?
- UID
- USERID
- USRID
- ID
Correct answer: 1
UID
The UID environment variable contains the path of the unique id of a particular user.
8) Which of the following Linux command is used to set values in environment variables?
- setval
- setenv
- export
- env
Correct answer: 3
export
The export command is used to set values in environment variables.
9) Which of the following Linux command is used to print all environment variables?
- printenv
- env
- envvars
- envs
Correct answer: 2
env
The env command is used to print all environment variables.
10) Which of the following Linux command is used to remove the value of an environment variable?
- removeenv
- remove
- unset
- delete
Correct answer: 3
unset
The unset command is used to remove the value of an environment variable.