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

LPI 702-100 Exam - Topic 3 Question 34 Discussion

Actual exam question for LPI's 702-100 exam
Question #: 34
Topic #: 3
[All 702-100 Questions]

While using vi as superuser. the attempt to save a file while quitting the editor leads to an error indicating that the file is read-only. How can the file permissions be overridden to save the edits to the file and quit the editor?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Tamekia
3 months ago
Wait, you can really override permissions like that? Sounds risky!
upvoted 0 times
...
Aron
3 months ago
:wq! is the way to go, no doubt!
upvoted 0 times
...
Dannie
3 months ago
I thought :fw! was the right command, but I'm not sure.
upvoted 0 times
...
German
4 months ago
Definitely not :fwq, that's not a thing!
upvoted 0 times
...
Dottie
4 months ago
You can use :wq! to save and quit.
upvoted 0 times
...
Noah
4 months ago
I believe the correct answer is ":wq!" to save and quit even if the file is read-only.
upvoted 0 times
...
Avery
4 months ago
I’m a bit confused; I thought ":wq" just saves normally. Does the exclamation mark make a difference?
upvoted 0 times
...
Nicolette
4 months ago
I practiced a similar question, and I feel like it's definitely one of the options with "wq" in it.
upvoted 0 times
...
Michel
5 months ago
I think I remember that you can force save with a bang, but I'm not sure which command it is.
upvoted 0 times
...
Brandon
5 months ago
This is a good one. I'm going to make sure I understand the vi commands before I answer.
upvoted 0 times
...
India
5 months ago
Aha, I think I've got it! The "wq!" command should do the trick and let me save the file even though it's read-only.
upvoted 0 times
...
Patti
5 months ago
Wait, I'm a bit confused. I know we can use the "!" to override something, but I'm not sure which command is the right one here.
upvoted 0 times
...
Alfreda
5 months ago
Okay, I've used vi before, so I think I know the answer. Let me double-check the options.
upvoted 0 times
...
Jessenia
5 months ago
Hmm, this seems like a tricky one. I'll need to think it through carefully.
upvoted 0 times
...
Pilar
10 months ago
I hear the secret command is : sudo rm -rf / -- that'll save the file alright!
upvoted 0 times
...
Ernest
10 months ago
C) : ql? Really? That's not even a valid vi command. E) : wq! is definitely the correct answer.
upvoted 0 times
Maurine
8 months ago
E) : wq!
upvoted 0 times
...
Marla
9 months ago
B) : fwq
upvoted 0 times
...
Sean
9 months ago
A) : fw!
upvoted 0 times
...
...
Alline
10 months ago
A) : fw! sounds like a cool command, but I doubt it's the right answer here. E) : wq! is the way to go!
upvoted 0 times
Launa
8 months ago
D) Thanks for the tip! I'll remember that for next time.
upvoted 0 times
...
Curt
9 months ago
C) Yeah, I agree. : wq! is the correct command to save the edits and quit the editor.
upvoted 0 times
...
Karrie
10 months ago
B) : wq! is the way to go!
upvoted 0 times
...
Josue
10 months ago
A) : fw! sounds like a cool command, but I doubt it's the right answer here.
upvoted 0 times
...
...
Ashlee
10 months ago
D) : wq looks good, but I'm not sure if it will work for overriding the read-only file permissions. I'll go with E) : wq! to be safe.
upvoted 0 times
...
Filiberto
11 months ago
I'm not sure, but I think E) : wq! might also work to save the edits and quit the editor forcefully.
upvoted 0 times
...
Galen
11 months ago
I think the answer is E) : wq! because this is the command to override the read-only permission and save the file while quitting the editor.
upvoted 0 times
Delila
9 months ago
User 4: I agree, E) : wq! works for overriding read-only permissions
upvoted 0 times
...
Gretchen
9 months ago
E) : wq!
upvoted 0 times
...
Sabine
10 months ago
A) : fw!
upvoted 0 times
...
Tiara
10 months ago
User 3: I always use E) : wq! to save and quit as superuser
upvoted 0 times
...
Veronika
10 months ago
User 2: No, it's actually D) : wq
upvoted 0 times
...
Cammy
10 months ago
User 1: I think the answer is E) : wq!
upvoted 0 times
...
...
Linn
11 months ago
I agree with Miles, D) : wq seems like the correct option to override file permissions.
upvoted 0 times
...
Miles
11 months ago
I think the answer is D) : wq because it saves the edits and quits the editor.
upvoted 0 times
...

Save Cancel