Solved

Edit /Save/Quit in VI Editor

Posted on 2012-12-24
7
372 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 76

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 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

13 Experts available now in Live!

Get 1:1 Help Now