sudo in terminal

Rick Stevens rstevens at vitalstream.com
Thu Feb 24 01:06:07 UTC 2005


Robert Storey wrote:
> On Wed, 23 Feb 2005 15:18:13 -0500
> "H. Crissman" <hcrissman at secure-mind.net> wrote:
> 
> 
>>On Wednesday 23 February 2005 13:22, Alexander Dalloz wrote:
>>
>>>Please read my yesterday's reply.
>>>
>>>Alexander
>>
>>Good call. Sorry about that. How would I make vi=vim, ie alias?
>>
>>H. Crissman
> 
> 
> Put a line in files .bashrc and .bash_profile as follows:
> 
>    alias vi='vim'
> 
> You'd have to do this for each user who wants to use vim instead of vi.
> 
> Of course, you could just do without the alias and type "vim" rather
> than "vi".

That will not work.  sudo does NOT execute the user's profile scripts so
the alias won't work for sudo.  The only answer is to actually have sudo
run "vim" instead of "vi".

The alias is only there so lazy people (like me) don't have to type that
bloody extra "m". ;-)
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-    When you don't know what to do, walk fast and look worried.     -
----------------------------------------------------------------------




More information about the fedora-list mailing list