Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation LFCS Exam - Topic 8 Question 91 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 91
Topic #: 8
[All LFCS Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

0/2000 characters
Shay
4 months ago
Really? I had no idea set did that!
upvoted 0 times
...
Meaghan
4 months ago
Nope, env just lists environment variables, not all.
upvoted 0 times
...
Jesusa
4 months ago
Wait, I thought env was the right one?
upvoted 0 times
...
Allene
5 months ago
Totally agree, set shows all variables!
upvoted 0 times
...
France
5 months ago
The correct command is B, set.
upvoted 0 times
...
Valene
5 months ago
I remember a question like this in practice, and I think "set" was the right answer for showing all variables and functions.
upvoted 0 times
...
Dong
5 months ago
I vaguely recall something about "env -a," but I don't think it lists everything. Could it be "set"?
upvoted 0 times
...
Tricia
5 months ago
I feel like "env" just shows the environment variables, not all defined ones. Maybe it's "set"?
upvoted 0 times
...
Rosendo
5 months ago
I think the command to list all variables is "set," but I'm not completely sure. I remember practicing with it.
upvoted 0 times
...
Ronald
5 months ago
I've used 'set' before to list variables, so I'm leaning towards that as the answer. But I want to make sure I'm not missing something, so I'll quickly review the other options too.
upvoted 0 times
...
Yasuko
5 months ago
Okay, let me think this through. I know 'env' lists environment variables, but I'm not sure if that includes user-defined variables and functions. I'll have to double-check the Bash documentation on this.
upvoted 0 times
...
Roosevelt
5 months ago
Hmm, I'm a bit confused on this one. I think it might be C, 'env -a', but I'm not 100% sure.
upvoted 0 times
...
Audra
6 months ago
I'm pretty sure the answer is B. The 'set' command lists all defined variables and functions in Bash.
upvoted 0 times
...
Cherelle
10 months ago
Whoever came up with D. echo $ENV as an option must be living in a different universe. That's just silly.
upvoted 0 times
...
Louvenia
10 months ago
The correct answer has to be B. set. I remember learning that in my Bash scripting class.
upvoted 0 times
Chu
9 months ago
Thanks for the reminder. I'll remember that for next time.
upvoted 0 times
...
Judy
9 months ago
Oh, you're right. It is B) set.
upvoted 0 times
...
Romana
9 months ago
No, I'm pretty sure it's B) set.
upvoted 0 times
...
Leonora
9 months ago
I think it's A) env.
upvoted 0 times
...
...
Reuben
11 months ago
I was thinking C. env -a, but now I'm second-guessing myself. Hmm, tough choice.
upvoted 0 times
Shelton
10 months ago
B) set
upvoted 0 times
...
Cory
10 months ago
A) env
upvoted 0 times
...
...
Geoffrey
11 months ago
I'm not sure, but I think A) env might also be a possible answer.
upvoted 0 times
...
Francene
12 months ago
I agree with you, Carmela. The set command lists all defined variables and functions in Bash.
upvoted 0 times
...
Avery
12 months ago
B. set is the way to go, no doubt about it. It's like the Swiss Army knife of Bash commands.
upvoted 0 times
Shawnna
11 months ago
D) echo $ENV
upvoted 0 times
...
Trinidad
11 months ago
C) env -a
upvoted 0 times
...
Fredric
11 months ago
B) set
upvoted 0 times
...
Luis
11 months ago
A) env
upvoted 0 times
...
...
Carmela
12 months ago
I think the answer is B) set.
upvoted 0 times
...

Save Cancel