Solved

Edit /Save/Quit in VI Editor

Posted on 2012-12-24
7
374 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
High Bandwidth Usage 6 57
fedora linux on laptop - setup sendmail - or some kind of email 5 45
CENTOS DHCP Server / PXE/TFTP 14 79
awk to variable in bash 2 43
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

777 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