User Tools

Site Tools


unix:freebsd:forlinuxadmins:equivilents

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

unix:freebsd:forlinuxadmins:equivilents [2019/07/11 03:41] (current)
Line 1: Line 1:
 +====== 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 |
 +| lsblk | geom disk list | View disk information (but, see below) | geom disk list |
 +| iptraf | iftop | watch network traffic | iftop -i ge0 |
 +
 +===== Lack of Equivalents =====
 +
 +There are some commands that are just not there or without as many options. 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/​]] or, you can use the command //geom disk list// which is close|
 +
 +
 +
 +
 +
 +===== References =====
 +
 +   * http://​www.freebsdonline.com/​content/​view/​768/​524/​
 +   * https://​www.freebsd.org/​doc/​en/​articles/​linux-users/​article.html
 +   * https://​stackoverflow.com/​questions/​4083848/​what-is-the-equivalent-of-proc-cpuinfo-on-freebsd-v8-1
  
unix/freebsd/forlinuxadmins/equivilents.txt ยท Last modified: 2019/07/11 03:41 (external edit)