简体   繁体   English

我们如何在 ubuntu 中没有 vim 包的情况下安装 vi

[英]How can we install vi without the vim package in ubuntu

I want to install only vi in my Ubuntu box.我只想在我的 Ubuntu 盒子中安装 vi。 I don't want to install the complete vim package which includes vi.我不想安装包含 vi 的完整 vim 包。 I am trying to reduce the image size of my OS including all the packages so that I have more space to install other packages.我正在尝试减小包括所有软件包在内的操作系统的映像大小,以便我有更多空间来安装其他软件包。

I am open to look into other lightweight text-editor alternatives also but it would be better if I stick with vi.我也愿意研究其他轻量级文本编辑器替代品,但如果我坚持使用 vi 会更好。

You can install vim-tiny package to install vi without vim.你可以安装 vim-tiny 包来安装没有 vim 的 vi。 Please run the command:请运行以下命令:

sudo apt-get install vim-tiny sudo apt-get install vim-tiny

如果你真的想要vi你可以在这里找到它: http : //ex-vi.sourceforge.net/

Busybox contains a light vi implementation. Busybox 包含一个轻量级的 vi 实现。 I think you can symlink /usr/bin/vi -> /bin/busybox or wherever busybox resides in Ubuntu systems.我认为您可以符号链接/usr/bin/vi -> /bin/busybox或任何 busybox 驻留在 Ubuntu 系统中的位置。 At least this is on my gentoo:至少这是在我的 gentoo 上:

(~) file `which vi`
/usr/bin/vi: symbolic link to ../../bin/busybox

On Ubuntu (16&18 at least) symlink with: ln -s /bin/busybox /bin/vi在 Ubuntu(至少 16 和 18)上,符号链接为: ln -s /bin/busybox /bin/vi

If busybox is not installed already it has its own package: apt install busybox如果busybox还没有安装,它有自己的包: apt install busybox

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM