rel:: [[Operating Systems MOC|Operating Systems]] # FreeBSD ## FreeBSD/Linux Command Equivalents | Linux Command | BSD Equivalent | Description | Example | |----------------------|------------------------|----------------------------------------------------|--------------------------------| | watch | cmdwatch | Repeatedly execute a command and display result | cmdwatch -n 15 df -h | | netstat | sockstat | get list of services providing network listeners | sockstat -4l ##see only IPv4 | | lsof | fstat | Find information on open files | fstat /tmp | | lsmod | kldstat | list loaded kernel modules | | | modprobe | kldload/kldunload | load or unload kernel modules | | | lspci | pciconf | list PCI devices | | | strace | truss | trace system calls | | | update-rc.d | sysrc | Add/Remove services started at boot | sysrc sendmail=YES | | cat /proc/cpuinfo | sysctl hw | View information on CPU on machine | sysctl hw | | lsblk | geom disk list | View disk information (but, see below) | geom disk list | | iptraf | iftop | watch network traffic | iftop -i ge0 | <table class="inline"> <thead> <tr class="row0"> <th class="col0 leftalign"> Linux Command </th><th class="col1 leftalign"> BSD Equivalent </th><th class="col2"> Description </th><th class="col3"> Example </th> </tr> </thead> <tbody><tr class="row1"> <td class="col0 leftalign"> watch </td><td class="col1 leftalign"> cmdwatch </td><td class="col2"> Repeatedly execute a command and display result </td><td class="col3"> cmdwatch -n 15 df -h </td> </tr> <tr class="row2"> <td class="col0"> netstat </td><td class="col1"> sockstat </td><td class="col2"> get list of services providing network listeners </td><td class="col3"> sockstat -4l #see only IPv4 </td> </tr> <tr class="row3"> <td class="col0"> lsof </td><td class="col1"> fstat </td><td class="col2"> Find information on open files </td><td class="col3"> fstat /tmp </td> </tr> <tr class="row4"> <td class="col0"> lsmod </td><td class="col1"> kldstat </td><td class="col2"> list loaded kernel modules </td><td class="col3"> </td> </tr> <tr class="row5"> <td class="col0"> modprobe </td><td class="col1"> kldload/kldunload </td><td class="col2"> load or unload kernel modules </td><td class="col3"> </td> </tr> <tr class="row6"> <td class="col0"> lspci </td><td class="col1"> pciconf </td><td class="col2"> list PCI devices </td><td class="col3"> </td> </tr> <tr class="row7"> <td class="col0"> strace </td><td class="col1"> truss </td><td class="col2"> trace system calls </td><td class="col3"> </td> </tr> <tr class="row8"> <td class="col0"> update-rc.d </td><td class="col1"> sysrc </td><td class="col2"> Add/Remove services started at boot </td><td class="col3"> sysrc sendmail=YES </td> </tr> <tr class="row9"> <td class="col0"> cat /proc/cpuinfo </td><td class="col1"> sysctl hw </td><td class="col2"> View information on CPU on machine </td><td class="col3"> sysctl hw </td> </tr> <tr class="row10"> <td class="col0"> lsblk </td><td class="col1"> geom disk list </td><td class="col2"> View disk information (but, see below) </td><td class="col3"> geom disk list </td> </tr> <tr class="row11"> <td class="col0"> iptraf </td><td class="col1"> iftop </td><td class="col2"> watch network traffic </td><td class="col3"> iftop -i ge0 </td> </tr> </tbody></table> ## Integrations - [FreeBSD and Firecracker](https://www.daemonology.net/blog/2022-10-18-FreeBSD-Firecracker.html) [[Firecracker - Lightweight Virtualization for Serverless Applications|Firecracker]]