FreeBSD: Find Out If Particular Kernel Feature Compiled Or Not

Q. How do I find out if a Particular feature is compiled into my running FreeBSD kernel or not?

A. FreeBSD stores kernel configuration file under directory called /usr/src/sys/$(uname -m)/conf. GENERIC is generic default kernel configuration file for FreeBSD stock kernel. The general format of a configuration file is quite simple. Each line contains a keyword and one or more arguments. Use vi or grep command to find out information about particular kernel feature or driver. For example, find out if ATAPI tape drives compiled or not, enter:
# grep atapist GENERIC
Sample output:

device		atapist		# ATAPI tape drives

Most lines only contain one argument. If you do not see any output or blank output, feature is not added in your kernel. Anything following a # is considered a comment and ignored. You can also use vi command to view file:
# vi GENERIC

Further readings:


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum