User Tools

Site Tools


Sidebar

unix:freebsd:forlinuxadmins:equivilents

BSD Equivilents to Linux Commands

Equivilents

For longtime Linux systems administrators, one of the greatest difficulties is finding the equivalent command in BSD to perform a task. Following table lists some of the ones I finally figured out.

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

Lack of Equivalents

There are some commands that are just not there, but the information can be found using other means. In many cases, the sysinfo scripts we have shows how to do it, and we have created links below. In other cases, we have linked to other resources.

Linux Command Description Link to script
lsblk Lists block devices. Under BSD, this is a combination of camcontrol, gpart, and grep'ing dmesg https://forums.freebsd.org/threads/lsblk-8-command-for-freebsd.56008/

References

unix/freebsd/forlinuxadmins/equivilents.txt · Last modified: 2018/04/17 02:53 by rodolico