One of the more confusing parts of BSD administration for many Linux admins is how to check memory. Many are so used to using the "free" command, that they are thrown when they come across:

free: Command not found.

But all is not lost! Checking memory on BSD is still easier than one might think. Although you could download a script to emulate the capabilities of "free", there is a simple built in command in BSD that will allow you to check this information.

sysctl is responsible for reporting on all system resources and information, and using the right parameters it will report the specific info you are looking for. In our case, the following command will output the physical memory in bytes:

sysctl hw.physmem