Which of the following commands displays all environment and shell variables?
Which of the following commands displays all environment and shell variables?
The correct answer is 'env'. The 'env' command is used to display all the environment variables in the shell. While it is true that 'set' would display both environment and shell variables, among the provided options, 'env' is the closest and most accurate command to fulfill the requirement of displaying environment variables.
Wrong answer, "env" displays only environment variables. "set" would be the right answer but is not present as a possible answer option.
"displays all environment and shell variables" is in the question
Yeah, and that's the wrong answer since "env", like bogvt already said, only displays environment variables, NOT shell variables. If you wanna list both, you have to use "set".
I agree with "set". Since the question asks for ALL environment and shell variables, you NEED to use "set". "env" will only see environment variables.
"The commands env , set , and printenv display all environment variables and their values." If you can see environment variables, it means you can see both of environment and variables. So, the answer is env.
No, it's not! It never was and it never will. That answer of yours is WRONG. Read the man pages properly dude and stop spreading false information man. Bogvt is right
The better answer is 'set'. In these four options, I choose 'env'. "set outputs all of the currently assigned shell variables and functions." https://learning.lpi.org/en/learning-materials/102-500/105/105.1/105.1_02/#:~:text=set%20outputs%20all%20of%20the%20currently%20assigned%20shell%20variables%20and%20functions.
env correct answer as it is verified in the exam too :)
From these options if you try out in the terminal emulator only the env and ls is working so from the possible answers available here env is the best one but I agree that set should be available as an option
The correct answer, that's definitively "set" , is not listed between possible answers. So, answer "env" may be the best worst answer? Or it's just a wrong transcrition from the dump???
the correct is "set"