Solved

I am unable to run vi in Single User mode

Posted on 2006-10-24
9
392 Views
Last Modified: 2013-12-13
Hello,

    Can some please help me with this i am unable to run VI in the Single user mode ...I exported the term and it  still did not work ..

set TERM=vt100
export TERM

set vi -o

I am unable to edit the file ...

Thanks all for your help in advance .
0
Comment
Question by:kaka123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 17796154
> set vi -o
what's that?

try: /bin/vi filename # OR: /usr/bin/vi filename
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 17797415
The "set vi -o" is a bash shell command that tells it to use vi-style command-line editing. Yuck.

Personally, I prefer Emacs style.

vi is dependent on libraries in /usr/lib. If you've booted into single-user mode and not all filesystems have been mounted, vi may not be able to run. Assuming you have used multiple disk slices for your filesystems, try "mountall" and then re-try vi.

Alternatively, ex was written to be self-sufficient and able to run in single-user mode.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17797514
Strange - but my /bin/vi does not depend on /usr/lib
In fact none from /sbin /bin should depend on anything from /usr ...

> The "set vi -o" is a bash shell command that tells it to use vi-style command-line editing.
Thanx - always learning ;)
0
Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

 

Author Comment

by:kaka123
ID: 17798266
As i mention in the question above that i am in S mode and i have try this

set TERM=vt100
export TERM

set vi -o
   
 what am i doing wrong this a sles 9 machin ...HELP ....
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17798410
And then You are running
vi /etc/fstab # for example? What's the error message?
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 17799035
I'll qualify my comment about vi needing libraries as being true in SunOS and Solaris. Altho with all the changes in Solaris 9 and Solaris 10, it might have changed.

"vi" in Linux is sometimes "vim" and so my comment would not apply (just like "mail" in SLES is actually "nail").

Back to the Question...I agree, we need the EXACT error message. What is displayed when you try to run vi?
0
 

Author Comment

by:kaka123
ID: 17799446
nothing i just can't edit the file when i type the above command let's say set vi -o it will go back to the command prompt with no errors but when i try to do vi it will not work strange .........HELP THE BOX IS STILL IN S MODE ...
0
 
LVL 43

Assisted Solution

by:ravenpl
ravenpl earned 100 total points
ID: 17801232
So You are saying that You typing
vi /etc/fstab
and it does nothing, just returnig to the shell prompt?
If so, then honestly I don't know what happens.
But, have You tried /bin/vi /usr/bin/vi
Maybe another editor like: nano OR joe OR pico OR jed

OT: if the OS in S mode, You may need to remount the rootfs in RW mode: mount -o rw,remount /
but even that vi should still run(inRO mode)
0
 
LVL 34

Accepted Solution

by:
PsiCop earned 400 total points
ID: 17804722
"set vi -o" is a SHELL CONFIGURATION command. It is applicable only to bash, as I recall. ksh or zsh might also support it, I dunno. Point is that it has NOTHING to do with *running* vi. All it does is tell the shell what command-line editing scheme you want to use. And it doesn't have any effect in sh, as I recall. You could very well be in an sh shell in single-user mode.

Bottom line: "set vi -o" is not relevant to your issue of not being able to run vi.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
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.

690 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