# Knobs vs. options?



## Daniel Tourde (Dec 23, 2015)

Hello,

I am giving FreeBSD (10.2) a try. I am a Gentoo Linux user, pretty comfortable with portage. The FreeBSD port system is not easy for me.
First of all: what is the difference between a knob and an option?
I noticed that ports-mgmt/lsknobs and a look at the Makefile does not give me the same information.


----------



## wblock@ (Dec 23, 2015)

Generally, options are what is shown by the menus presented when building a port.  Knobs are variables, generally set on the command line.  For example, emulators/virtualbox has many selectable options.  `lsknobs` shows that there is also a "knob" called WITH_OPENSSL_BASE.


----------



## Daniel Tourde (Dec 23, 2015)

I don't understand the difference between the 2 mechanisms. Why two ways of configuring a package instead of one? What is the fundamental difference?


----------



## wblock@ (Dec 24, 2015)

Knobs are rarely-changed settings, for advanced users or special cases.  If they were for general use, they would be options.

Oh, and in general we recommend accepting the defaults unless you are certain that an option should be changed.


----------



## jrm@ (Dec 24, 2015)

wblock@ said:


> ...in general we recommend accepting the defaults unless you are certain that an option should be changed.


wblock@, did you intend to say *option* or knob?

I almost never change knobs, but I change options all the time.  Of course, it makes sense to only change an option for a good reason, but there are often good reasons.  For example, simply turning off the dbus option in www/firefox means many fewer packages will be installed that serve no purpose if you aren't running a desktop environment.  This level of control is something missing from all other operating systems (that I'm aware of).  Without them, we might as well just exclusively use packages like most GNU/Linux distributions.


----------



## wblock@ (Dec 24, 2015)

It really doesn't matter, it applies to both options and knobs, but yes, I did mean option.  It is fine to change an option when you understand what it means.  But we sometimes see newcomers who end up with non-functioning applications after taking a heavy hand to incompletely-understood options.


----------

