## Understand the difference between a pre-compiled binary and compiling from source ##

[Author](authors.html): _name_ _[[contact]]_ _[[BSD_flavour]]_

[Reviewer](technical_reviewers.html): _name_ _[[contact]]_ _[[BSD_flavour]]_

[Reviewer](technical_reviewers.html): Chris Silva racerx@makeworld.com FreeBSD/OpenBSD

----



### Concept ###

Be familiar with the default location of both
the ports(((ports))) collection and the pkgsrc(((pkgsrc))) collection
and which BSDs use which type of packages (((packages))) collection.
Also be able to recognize the extension used by packages(((packages))).
In addition, be aware of the advantages and disadvantages
of installing a precompiled binary and the advantages and disadvantages
of compiling a binary from source.


### Introduction ###

The BSD operating systems provide software build systems for installing
third-party add-on software from source code.

Location of ports collection: /usr/ports (FreeBSD, OpenBSD)

Location of pkgsrc collection: /usr/pkg (NetBSD, DragonFly)

Location of packages: /var/db/pkg/<pkg_name> (FreeBSD)

Extension used by packages: TODO (tgz, tbz?)

Installing a precompiled binary or Compiling a binary from source:
Precompiled binaries are quick and easy to install but they don't allow for customization of the binary to a system's particular needs. Compiling a binary from source allows for customization, but can take a long time on slower or older systems.


### Examples ###


### Practice Exercises ###


### More information ###
Dragonfly and NetBSD provide pkgsrc/pkgtools/pkg\_chk, pkgsrc/pkgtools/pkg\_comp, make update and make replace; portupgrade, portsnap and cvsup are available as third-party utilities

