Resources · April 25, 2021 0

How to know memory size in FreeBSD

Perhaps you could find your system’s memory size easily on Linux systems with command:

# free -m -h

However, there is no command “free” on FreeBSD. Then, you should use:

# bc -le "scale=2;`sysctl -n hw.physmem`/(1024*1024)" -e quit
# bc -le "scale=2;`sysctl -n hw.physmem`/(1024*1024*1024)" -e quit