[nzlug] Re: OMG, I can no longer run 'sudo' !
Michael Adams
linux_mike at paradise.net.nz
Sun Aug 20 16:23:12 NZST 2006
On Sat, 19 Aug 2006 20:03:25 -0700
Nevyn wrote:
> On 8/11/06, Sid Bachtiar <sid.bachtiar at gmail.com> wrote:
> > > > Everyone using a UNIX shell should at least know how to get out
> > > > of vi.<esc>:wq
> > >
> > > More like
> > >
> > > <esc>:q!
> > >
> > > Quit without saving is more useful than save-and-exit.
> > >
> > > (which is wq or x)
> >
> > I virtually hit just about every keys on the keyboard with my head
> > trying to get out of that vigr command. I tried ESC, Q, CTRL+Z,
> > CTRL+X, etc. I googled up quite a few keywords (from my other
> > machine) with no luck. In the end, I just rebooted the machine and
> > used nano.
> >
> > Oh well, at least I now learned how to get to the GRUB boot-menu and
> > start the recovery mode.
>
> Hi Sid - try visiting this site:
> http://www.eng.hawaii.edu/Tutor/vi.html
>
> It's an invaluable skill to have - personally though, if nano is
> avaliable, that's what I tend to use.
>
Yep, i recommend learning at least these 3 simple commands
[i] to get into insert mode.
[Esc] to get out of any mode.
[:][w][q] to write and quit (or use seperately as [:][w] and [:][q]).
Why, because vi will be on any linux computer you sit down at.
Also google and print a "vi cheatsheat" and have it handy.
Be aware that mostly you will be using vim not vi.
--
Michael
Those that can, do; those that can't, teach.
More information about the NZLUG
mailing list