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 LFCA Exam - Topic 1 Question 31 Discussion

Actual exam question for Linux Foundation's LFCA exam
Question #: 31
Topic #: 1
[All LFCA Questions]

When using vi or vim to edit a file, how do you exit without saving?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Jovita
4 months ago
Really? I always thought you could just close the terminal!
upvoted 0 times
...
Dorsey
4 months ago
I thought ZZ would work too, but it saves changes!
upvoted 0 times
...
Josue
4 months ago
Wait, isn't :exit also a valid command?
upvoted 0 times
...
Jennifer
4 months ago
Totally agree, :q! is the way to go!
upvoted 0 times
...
Carissa
5 months ago
It's definitely :q! to exit without saving.
upvoted 0 times
...
Alana
5 months ago
I’m leaning towards :q! as the answer, but I might be mixing it up with another command I practiced.
upvoted 0 times
...
Kenny
5 months ago
I feel like I’ve seen :exit before, but I’m pretty sure that’s not the right command for quitting without saving.
upvoted 0 times
...
Ricarda
5 months ago
I remember practicing this, and I think :wq! is for saving, not exiting without saving.
upvoted 0 times
...
Adelina
5 months ago
I think to exit without saving, it's definitely something like :q!, but I’m not 100% sure.
upvoted 0 times
...
Felice
5 months ago
Ah, the old vi/vim exit without saving trick. It's been a while since I've used it, but I'm pretty sure the answer is A, ":q!". That should do the trick.
upvoted 0 times
...
Nathan
5 months ago
I'm a bit confused by this question. I don't use vi/vim very often, so I can't remember the exact command for exiting without saving. I'll have to guess on this one.
upvoted 0 times
...
Dominga
5 months ago
Okay, I've got this. The way to exit vi/vim without saving is to use the ":q!" command. It's a classic vi/vim trick that I've used many times.
upvoted 0 times
...
Benton
5 months ago
Hmm, I'm a bit unsure about this one. I know there are different ways to exit vi/vim, but I can't remember the exact command for exiting without saving. I'll have to think about this one.
upvoted 0 times
...
Wenona
6 months ago
I'm pretty sure the answer is A. I've used vi/vim before and ":q!" is the command to exit without saving.
upvoted 0 times
...
Rebbecca
6 months ago
Hmm, I think it has to do with flexible channel spacing, but I'm not 100% confident. I'll try to remember the key points about Flexgrid and see if that helps me narrow down the answer.
upvoted 0 times
...
Geraldine
10 months ago
Wait, you can exit vi without saving? Whoa, mind blown! :q! is the one, I'm remembering that for the next time I accidentally launch vi and panic.
upvoted 0 times
Jettie
10 months ago
It's a lifesaver when you accidentally open vi and need to get out quickly!
upvoted 0 times
...
Burma
10 months ago
I always forget the command too, but :q! is definitely the one to remember.
upvoted 0 times
...
Miesha
10 months ago
Yeah, :q! is the way to go if you want to exit without saving.
upvoted 0 times
...
...
Ronny
10 months ago
C) :wq! would save the file before exiting, which is the opposite of what I want. :q! is the way to go here.
upvoted 0 times
Gussie
9 months ago
A) :q!
upvoted 0 times
...
Lashaunda
9 months ago
B) ZZ
upvoted 0 times
...
Chu
10 months ago
A) :q!
upvoted 0 times
...
...
Crista
11 months ago
D) :exit sounds like it could work, but I'm not sure if that's a valid command in vi/vim. Better stick with the classic :q! just to be safe.
upvoted 0 times
Tamra
9 months ago
C) :wq! is another good option to exit and save the changes.
upvoted 0 times
...
Noe
9 months ago
A) Yeah, better safe than sorry with :q!.
upvoted 0 times
...
Jeffrey
9 months ago
B) ZZ is also a valid command to exit without saving.
upvoted 0 times
...
Cherelle
9 months ago
A) :q! sounds like the safest option.
upvoted 0 times
...
Luisa
9 months ago
D) :exit
upvoted 0 times
...
Colette
9 months ago
C) :wq!
upvoted 0 times
...
Junita
10 months ago
B) ZZ
upvoted 0 times
...
Noah
10 months ago
A) :q!
upvoted 0 times
...
...
Steffanie
11 months ago
But :q! is the command to quit without saving in vi or vim
upvoted 0 times
...
Nikita
11 months ago
B) ZZ seems like it might work, but I'm pretty sure that's for saving and exiting, not just exiting without saving. I'm going with A) :q!.
upvoted 0 times
Zachary
10 months ago
B) Yeah, you're right. ZZ is for saving and exiting. :q! is the one for just exiting.
upvoted 0 times
...
Chauncey
10 months ago
A) :q! is the correct command to exit without saving in vi or vim.
upvoted 0 times
...
...
Jamal
11 months ago
I disagree, I believe the correct answer is B) ZZ
upvoted 0 times
...
Daniel
11 months ago
The :q! command is definitely the way to exit without saving in vi or vim. I always use that when I accidentally make changes I don't want to keep.
upvoted 0 times
Pamella
10 months ago
No problem, happy to help!
upvoted 0 times
...
Leila
10 months ago
I always forget the command, thanks for the reminder.
upvoted 0 times
...
William
10 months ago
Yeah, it's a lifesaver when you make a mistake.
upvoted 0 times
...
Tomoko
10 months ago
I agree, :q! is the way to go.
upvoted 0 times
...
...
Steffanie
12 months ago
I think the answer is A) :q!
upvoted 0 times
...

Save Cancel