New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

GAQM LCP-001 Exam - Topic 5 Question 80 Discussion

Actual exam question for GAQM's LCP-001 exam
Question #: 80
Topic #: 5
[All LCP-001 Questions]

Many people like the vi text editor but the default bash command line editor recognizes emacs keystrokes. What command entered into abash initialization file will have bash recognize vi keystrokes after login?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Aaron
3 months ago
Just to clarify, `alias emacs=vi` won't work for this.
upvoted 0 times
...
Rosalia
3 months ago
Wait, are you sure that's right?
upvoted 0 times
...
Page
3 months ago
Agreed, `set -o vi` is the way to go!
upvoted 0 times
...
Elise
4 months ago
I thought it was `unset emacs`?
upvoted 0 times
...
Merrilee
4 months ago
It's definitely `set -o vi`!
upvoted 0 times
...
Rikki
4 months ago
Yeah, I agree with "set -o vi," but I also wonder if "unset emacs" could somehow relate to it.
upvoted 0 times
...
Carri
4 months ago
I’m a bit confused about the other options, though. I don’t think "alias emacs=vi" would work for this.
upvoted 0 times
...
Emeline
4 months ago
I remember practicing with similar questions, and I feel like "set -o vi" was definitely one of the options we discussed.
upvoted 0 times
...
Carla
5 months ago
I think the command to set the editor to vi is something like "set -o vi," but I'm not completely sure.
upvoted 0 times
...
Xochitl
5 months ago
I'm feeling confident about this one. The answer is definitely set -o vi.
upvoted 0 times
...
Freida
5 months ago
The key here is to figure out how to get bash to recognize vi keystrokes. I'm pretty sure the answer is option D.
upvoted 0 times
...
Eulah
5 months ago
I'm a bit confused by the wording of this question. Can someone clarify what the default bash command line editor is?
upvoted 0 times
...
Dorothea
5 months ago
Okay, I think I know the answer to this. Let me double-check the options.
upvoted 0 times
...
Elfrieda
5 months ago
Hmm, this seems like a tricky one. I'll need to think through the different options carefully.
upvoted 0 times
...
Maryann
10 months ago
I'm more of a nano guy myself, but D) set -o vi has got to be the way to go if you want to use vi in the bash shell.
upvoted 0 times
Shawana
9 months ago
I'm not a fan of vi, but set -o vi is the command you need for bash.
upvoted 0 times
...
Joanna
9 months ago
I always use vi, so set -o vi is definitely the right choice.
upvoted 0 times
...
Lawrence
9 months ago
I prefer nano too, but set -o vi is the way to go for vi keystrokes in bash.
upvoted 0 times
...
...
Dannette
10 months ago
Haha, alias emacs=vi? That's like trying to put a square peg in a round hole. Nice try, but B) isn't the right answer.
upvoted 0 times
Ivette
9 months ago
I agree, setting vi mode with D) is the way to go.
upvoted 0 times
...
Thomasena
9 months ago
Yeah, B) definitely doesn't make sense. A) or D) seem like better options.
upvoted 0 times
...
Wayne
9 months ago
E) unset emacs
upvoted 0 times
...
Serina
10 months ago
D) set -o vi
upvoted 0 times
...
Lawrence
10 months ago
A) history -p vi
upvoted 0 times
...
...
Albert
10 months ago
I don't know, E) unset emacs sounds like it might work too. Get rid of that pesky emacs and bring on the vi!
upvoted 0 times
...
Stephanie
11 months ago
D) set -o vi seems like the obvious choice here. It's the command to set the bash shell to use vi-style key bindings.
upvoted 0 times
Alfreda
10 months ago
Me too, it's just more intuitive for me.
upvoted 0 times
...
Torie
10 months ago
I always prefer using vi keystrokes over emacs.
upvoted 0 times
...
Kristin
10 months ago
That makes sense, it sets the bash shell to use vi-style key bindings.
upvoted 0 times
...
Queen
10 months ago
I think the answer is D) set -o vi.
upvoted 0 times
...
...
Madalyn
11 months ago
I'm not sure, but I think option B) alias emacs=vi could also work.
upvoted 0 times
...
Antonio
11 months ago
I agree with Anglea. Setting vi mode with set -o vi makes sense.
upvoted 0 times
...
Anglea
11 months ago
I think the answer is D) set -o vi.
upvoted 0 times
...

Save Cancel