Wednesday, May 14, 2025

Useful troubleshooting commands in FreeBSD

One-liner #1

freebsd-version -kru ; uname -aKU

These two commands in sequence display detailed information about your FreeBSD system's version and kernel. It helps to

  • Detect version mismatches between kernel and userland (e.g. after patching).
  • Confirm if a reboot is pending.
  • See detailed kernel version info (compiled vs. running)

One-liner #2

pciconf -lv | grep -B 3 -A 1 display

This one-liner helps you identify the PCI display controller (graphics card) and shows a few lines before and after the line containing the word display for context, including device ID, vendor, and possibly the driver in use.

One-liner #3

pkg repos -el | sort -f ; pkg repos -e

This one-liner prints a sorted list of repository names and full configuration of each repository. This is helpful for debugging, auditing, or confirming what repositories are enabled and how they're configured.

No comments:

Post a Comment