Solved

Edit /Save/Quit in VI Editor

Posted on 2012-12-24
7
373 Views
Last Modified: 2012-12-30
I have edited a file with VI editor
now when I type :wq
in Replace mode, I get error E:45
in Insert Mode, it just goes to the next line after I press Enter

Any help on this, or better show me how to install another user friendly editor.

Thanks
0
Comment
Question by:jskfan
7 Comments
 
LVL 18

Assisted Solution

by:Andrej Pirman
Andrej Pirman earned 100 total points
ID: 38719288
Shift-lock or Scroll-lock maybe?
0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 200 total points
ID: 38719425
Did you try hitting the Esc key then using
:w!q
?

w! forces it to overwrite.
If that doesn't work, E:45 means the file is marked read-only... are you starting vi with sudo?

What distro of linux are you using?
0
 

Author Comment

by:jskfan
ID: 38719454
nano is easier than vi, I guess
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 77

Assisted Solution

by:arnold
arnold earned 100 total points
ID: 38719663
As darr247 pointed out, you were editing a read-only file.

Depending on which file you were editing, there might be a ..
I.e. to eit /etc/sudoers file, one should use visudo
vipw for /etc/passwd.
Etc.
0
 
LVL 1

Accepted Solution

by:
odintsov earned 100 total points
ID: 38720753
Hello,

I recommend nano, it is very simple (u can save file using CTRL+O and exit from it using CTRL+X).

U can install nano on Debian/Ubuntu using following command in terminal:
sudo apt-get install -y nano

On CentOS/Fedora:
sudo yum install -y nano
0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 200 total points
ID: 38721151
If your distro came with GNOME desktop, GEdit is installed by default. It works about like Notepad in windows.
0
 

Author Closing Comment

by:jskfan
ID: 38731939
thank you
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iptables limit connection per ip correct way ? 2 94
linux apache localhost dev laptop 5 48
nagios 1 22
Setting up two Raspberry Pi gateways/routers 3 40
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now