Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

GAQM LCP-001 Exam - Topic 5 Question 80 Discussion

Posted by Harris on Oct 21, 2024 at 08:04 AM

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?

Suggested Answer: D

Get Premium LCP-001 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
33 comments · newest first
AA
Aaron 11 months ago
Just to clarify, `alias emacs=vi` won't work for this.
RO
Rosalia 11 months ago
Wait, are you sure that's right?
PA
Page 11 months ago
Agreed, `set -o vi` is the way to go!
EL
Elise 12 months ago
I thought it was `unset emacs`?
ME
Merrilee 12 months ago
It's definitely `set -o vi`!
RI
Rikki 12 months ago
Yeah, I agree with "set -o vi," but I also wonder if "unset emacs" could somehow relate to it.
CA
Carri 1 year ago
I’m a bit confused about the other options, though. I don’t think "alias emacs=vi" would work for this.
EM
Emeline 1 year ago
I remember practicing with similar questions, and I feel like "set -o vi" was definitely one of the options we discussed.
CA
Carla 1 year ago
I think the command to set the editor to vi is something like "set -o vi," but I'm not completely sure.
XO
Xochitl 1 year ago
I'm feeling confident about this one. The answer is definitely set -o vi.
FR
Freida 1 year 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.
EU
Eulah 1 year ago
I'm a bit confused by the wording of this question. Can someone clarify what the default bash command line editor is?
DO
Dorothea 1 year ago
Okay, I think I know the answer to this. Let me double-check the options.
EL
Elfrieda 1 year ago
Hmm, this seems like a tricky one. I'll need to think through the different options carefully.
MA
Maryann 1 year 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.
SH
Shawana 1 year ago
↳ replying to Maryann
I'm not a fan of vi, but set -o vi is the command you need for bash.
JO
Joanna 1 year ago
↳ replying to Maryann
I always use vi, so set -o vi is definitely the right choice.
LA
Lawrence 1 year ago
↳ replying to Maryann
I prefer nano too, but set -o vi is the way to go for vi keystrokes in bash.
DA
Dannette 2 years 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.
IV
Ivette 1 year ago
↳ replying to Dannette
I agree, setting vi mode with D) is the way to go.
TH
Thomasena 1 year ago
↳ replying to Dannette
Yeah, B) definitely doesn't make sense. A) or D) seem like better options.
WA
Wayne 1 year ago
↳ replying to Dannette
E) unset emacs
SE
Serina 1 year ago
↳ replying to Dannette
D) set -o vi
LA
Lawrence 1 year ago
↳ replying to Dannette
A) history -p vi
AL
Albert 2 years 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!
ST
Stephanie 2 years 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.
AL
Alfreda 1 year ago
↳ replying to Stephanie
Me too, it's just more intuitive for me.
TO
Torie 1 year ago
↳ replying to Stephanie
I always prefer using vi keystrokes over emacs.
KR
Kristin 1 year ago
↳ replying to Stephanie
That makes sense, it sets the bash shell to use vi-style key bindings.
QU
Queen 2 years ago
↳ replying to Stephanie
I think the answer is D) set -o vi.
MA
Madalyn 2 years ago
I'm not sure, but I think option B) alias emacs=vi could also work.
AN
Antonio 2 years ago
I agree with Anglea. Setting vi mode with set -o vi makes sense.
AN
Anglea 2 years ago
I think the answer is D) set -o vi.
0/2000 characters

Save Cancel