# How to include VIM in FreeBSD base system so that all jails automatically have it



## joggx (May 27, 2021)

Hi there,

As I don't want to install vim individually in each jail, it would be time saving to include it in the base system, so that each time a jail is created it is automatically available in it.

Thx


----------



## SirDice (May 27, 2021)

Ports/packages are not part of the base system and should be kept that way.

sysutils/firstboot-pkgs might be useful for you. If you use sysutils/bastille you can create templates that will automatically install/configure things too.


----------



## zirias@ (May 27, 2021)

In theory:

Create a local git branch for /usr/src
add it to the source tree in the same way as nvi: https://cgit.freebsd.org/src/tree/contrib/nvi
update https://cgit.freebsd.org/src/tree/usr.bin/vi to use vim instead of nvi
probably a lot of fiddling with the build system
So, in practice: not worth the effort.


----------



## im (May 27, 2021)

I prefer to have a preconfigured jail-template for new jails.
Just setup the new jail, configure it as you want, and just copy preconfigured jail to new jail destination.
You can use pax() or rsync for making a copy of a directory tree which contains jail-template.


----------



## joggx (May 28, 2021)

SirDice said:


> Ports/packages are not part of the base system and should be kept that way.
> 
> sysutils/firstboot-pkgs might be useful for you. If you use sysutils/bastille you can create templates that will automatically install/configure things too.


Bastille looks promising will check that out.


----------

