Linux Environment and Variables

Test knowledge of environment variables and shell configuration.

1. What command is used to display the value of an environment variable?
2. Which environment variable holds the current user's home directory?
3. What does the PATH environment variable specify?
4. Which command lists all environment variables?
5. How do you reference an environment variable in a shell command?
6. Which file is typically used to set environment variables for all users on the system?
7. What is the default shell for most Linux systems?
8. Which environment variable stores the current working directory?
9. How do you make an environment variable available to child processes?
10. Which command is used to unset an environment variable?
11. Which of the following are common environment variables in Linux?
12. Which files are used to set user-specific environment variables that persist across sessions?
13. Which commands can be used to display environment variables?
14. Which of the following statements about environment variables are true?
15. Environment variables set in a shell session are available to parent processes.
16. The USER environment variable contains the username of the current user.
17. The 'export' command is required to make a variable an environment variable (as opposed to a shell variable).
18. What command is used to display the value of the PATH environment variable?
19. What file in a user's home directory is commonly used to set environment variables that take effect when a new interactive shell starts?
20. What environment variable is used to specify the default editor for command-line tools?
Answered 0 of 0 — 0 correct