FACTER(1)
π FACTER(1) β hey bestie, lemme tell u about facter π
okay so, first things first: this is the manual page for facter, sitting in the General Commands Manual section of your man pages. yep, section 1, the one you actually read. and honestly? she's iconic. let's get into it π«Ά
β¨ NAME β¨
facter β collect and display facts about the current system</p> π¦
β¨ SYNOPSIS β¨
like, the whole vibe in one breath:
facter [options] [query ...]
facter --version
facter --list-block-groups
facter --list-cache-groups
facter --help
πΈ DESCRIPTION πΈ
so facter is this command-line tool that gathers basic facts about nodes (systems) β think hardware details, network settings, OS type and version, and a whole bunch more. it's literally the gossip girl of your machine. π
and the way it works? these facts get made available as variables in your Puppet manifests</>, so you can use them to feed conditional expressions in Puppet. it's giving "if this then that, no cap."
if you don't give it any queries, then all the facts come back. all of them. the entire feed. π
also, a lot of the command line options can be set via the HOCON config file instead of typed out every time. that same file can also block or cache certain fact groups. multitasking queen.
π OPTIONS π
one bullet per flag, no skipping, we don't gatekeep here:
--colorβ turn color output on. π--no-colorβ turn color output off. sad but valid.-c,--config=valueβ where the config file lives. that's the location, babe.--custom-dir=valueβ a directory to use for custom facts.-d,--debugβ enable debug output. all the tea. π--external-dir=valueβ a directory to use for external facts.--hoconβ output in Hocon format.-j,--jsonβ output in JSON format. classic, we love.-l,--log-level=valueβ set the logging level. supported levels are:none,trace,debug,info,warn,error, andfatal. pick your fighter.--no-blockβ disable fact blocking.--no-cacheβ disable loading and refreshing facts from the cache.--no-custom-factsβ disable custom facts.--no-external-factsβ disable external facts.--no-rubyβ disable loading Ruby, facts requiring Ruby, and custom facts. three for one, lowkey efficient.--traceβ enable backtraces for custom facts.--verboseβ enable verbose (info) output. she talks a lot and we listen.--show-legacyβ show legacy facts when querying all facts.-y,--yamlβ output in YAML format.--strictβ enable more aggressive error reporting. she will tell you. π₯-t,--timingβ show how much time it took to resolve each fact. clock in, bestie β±οΈ--sequentialβ resolve facts sequentially. one at a time, no cutting the line.--http-debugβ whether to write HTTP request and responses tostderr.
π¨ not me being dramatic but: this should never be used in production. fr fr. never ever. π
-p,--puppetβ load the Puppet libraries, thus allowing Facter to load Puppet-specific facts.
π FILES π
/etc/facter/facter.confβ a HOCON config file that can be used to specify directories for custom and external facts, set various command line options, and specify facts to block. see the example below for details, or visit the [GitHub README](https://github.com/puppetlabs/puppetlabs-hocon#overview) athttps://github.com/puppetlabs/puppetlabs-hocon#overview. π
π EXAMPLES π
display all facts
the full dump, every last fact, main character energy:
$ facter
disks => {
sda => {
model => "Virtual disk",
size => "8.00 GiB",
size_bytes => 8589934592,
vendor => "ExampleVendor"
}
}
dmi => {
bios => {
release_date => "06/23/2013",
vendor => "Example Vendor",
version => "6.00"
}
}
[...]
display a single structured fact
just the processors one, pls:
$ facter processors
{
count => 2,
isa => "x86_64",
models => [
"Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz",
"Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz"
],
physicalcount => 2
}
display a single fact nested within a structured fact
drill down, get specific, we love a deep dive π§
$ facter processors.isa
x86_64
display a single legacy fact
note that non-structured facts existing in previous versions of Facter are still available, but are not displayed by default due to redundancy with newer structured facts β they're retired but they never really left. π
$ facter processorcount
2
format facts as JSON
serve it up pretty:
$ facter --json os.name os.release.major processors.isa
{
"os.name": "Ubuntu",
"os.release.major": "14.04",
"processors.isa": "x86_64"
}
an example config file
here's what a config file is giving:
# always loaded (CLI and as Ruby module)
global : {
external-dir : "~/external/facts",
custom-dir : [
"~/custom/facts",
"~/custom/facts/more-facts"
],
no-external-facts : false,
no-custom-facts : false,
no-ruby : false
}
# loaded when running from the command line
cli : {
debug : false,
trace : true,
verbose : false,
log-level : "info"
}
# always loaded, fact-specific configuration
facts : {
# for valid blocklist entries, use --list-block-groups
blocklist : [ "file system", "EC2" ],
# for valid time-to-live entries, use --list-cache-groups
ttls : [ { "timezone" : 30 days } ]
}
and that's the whole page, bestie, you ate it. π«Άβ¨ this beauty came to you from Debian, dated Aug 22, 2025, and it's the FACTER(1) manual β go forth and know thy system. periodt. π
π
π¦ where this page comes from
- ubuntu stonking: openfact 5.6.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms