102-500 Exam QuestionsBrowse all questions from this exam

102-500 Exam - Question 80


Which of the following commands lists all defines variables and functions within Bash?

Show Answer
Correct Answer: D

The command 'set' lists all the currently defined shell variables and functions within Bash. It displays a lot of information, including shell variables and functions, which can then be filtered or viewed using additional tools like 'less' for better readability.

Discussion

3 comments
Sign in to comment
jeggaOption: D
Dec 1, 2021

D is correct

drliu1202Option: D
Aug 11, 2022

"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.

kleverOption: D
Jan 11, 2023

set outputs all of the currently assigned shell variables and functions. Since that can be a lot of lines (try it yourself!), it is recommended to use it in combination with a pager such as less: $ set | less