FACTER(1)

πŸ“¦ version 5.6.0, in ubuntu stonking

πŸ’– 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, and fatal. 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 to stderr.
🚨 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 πŸŽ€


🌈 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