Alternative commands on FreeBSD
Some commands on FreeBDS are different from those on most Linux distribution, here are some alternative/replacement commands used on FreeBSD.
netstat
# on freebsd sockstat could check sockets state
pkg install sockstat
sockstat
sockstat -4l
sockstat -6l
free
pkg install freecolor
freecolor
apt & yum
pkg update && pkg upgrade
pkg install xxx
pkg delete yyy
check swap
pstat -s
swapinfo -h
pidstat
procstat -a
lspci
pciconf -lv
## or
pkg install pciutils
proc
FreeBSD
doesn’t mountprocfs
file system by default, if you need it, you can mount it yourself
mount -t procfs proc /proc
or add to it /etc/fstab
proc /proc procfs rw 0 0
ldd
display the status of any files dynamically linked into the kernel
kldstat
kldstat -v
insmod & rmmod
cd /boot/kernel
kldstat
kldload zfs.ko
kldstat
kldunload zfs.ko
kldstat
Reference
https://docs.freebsd.org/en/books/handbook
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.me
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No privacy information is collected here