Erek Dyskant <[EMAIL PROTECTED]> wrote:

This was discussed previously soon after CentOS 5.0 was released. The > upstream distribution changed root from using vim (with syntax > highlighting) to using vi. With the 4.X versions root was using vim. > The 5.X configuration is:
>
> [EMAIL PROTECTED] ~]# which vi
> /bin/vi
>
> [EMAIL PROTECTED] ~]# which vi
> vi:      aliased to vim
> [EMAIL PROTECTED] ~]# which vim
> /usr/bin/vim
In theory, programs in /bin are statically linked, so they work even when you have library issues going on. Anyway, just use the vim command explicitly or add alias vi=vim to your ~root/.profile
The static linking part is no longer true:

[EMAIL PROTECTED] ~]# ls -l /bin/vi
-rwxr-xr-x 1 root root 628808 May  9  2007 /bin/vi
[EMAIL PROTECTED] ~]# file /bin/vi
/bin/vi: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

I would guess that any shared libraries used by vi are in or under /lib. That way the required libraries should also always be available.

Just for comparison, the executable for vim is quite a bit bigger:

[EMAIL PROTECTED] ~]# ls -l /usr/bin/vim
-rwxr-xr-x 1 root root 2817056 May  9  2007 /usr/bin/vim

This is just another example of the upstream distribution being very conservative for possibly several different reasons. There are also a number of ways to override their choice. I just wanted to point out that the change from vim to vi for root was intentional. Someone changing it back should understand the implications of what they're doing.

Cheers,
Dave

--
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to