[FreeBSD] How to install ports collection manually in FreeBSD


As an Administrator or a Device Drive developer you may need some utilities on the go to work in a convenient environment.
Let’s say you want to install VIM editor, then you need to have ports collection installed in your system otherwise you have to add the particular package manually.
It’s always a better idea to keep the ports collection installed in your system either while installing system or manually as explained below.

Installing ports collection manually is needed if you have not done while installing.
Please see the following to see where you have to set it up:
Distribution select step

NOTE:
Please make sure that you have a working internet connection on the system where you are going to install ports collection.

Installing ports collection:

First fetch a compressed snapshot of the ports tree.

# portsnap fetch

Extract the compressed ports tree.

# portsnap extract

Then update the ports tree.

# portsnap update

 

More information on portsnap:

You can check the manual page in your FreeBSD system to have a better idea on portsnap.

$ man portsnap

 

How to search the apps in the ports collection:

When you need an application then type the following command and see what result you get.
For vim editor type the following command:

# whereis vim

There you are.
The output of the above command tells you from where can you install vim command.

# /usr/ports/editors/vim

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.