Re: sudo in terminal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>When I "vi example.file" the text inside the file is color coded based
>>on format (ie. commented out lines are blue). But when I "sudo vi
>>example.file" that color coding is lost. How can I enable that when I
>>edit a file using sudo? It really helps when you are looking at a long
>>config file.
>>
>>
>
>This is a wild guess. Maybe the paths are different when you sudo, and
>you're getting a different vi when you sudo? There's only one vi on my
>current FC3 system but in the past, on other linuxes and Unixes, I've
>occasionally had multiple ones installed. Try
>
>which vi
>
>as yourself and as root (get there with su -) and see if they're different.
>
>
>
Thanks for the reply. That does not appear to be it. I get the same path
for both. Any other ideas?

>From the man page of su... to become a user while maintaining the users
previously exported environment, use su [username].  To become a user but
change the environment to what would normally be expected if the user logged
in, use su - [username].  Try examining the environment variables using
'env', while logging in as both su, su - and a normal shell login.  Probably
find that the term type is different, or something like that.

Hope this helps,

Ben.

Information Technology Officer
Macquarie Textiles Group Ltd
Phone: 02 6043 0235
Fax: 02 60411 321
E-mail ben.halicki@xxxxxxxxxxxxxxxxxxxxxxxx


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux