See free / used memory in mac os terminal
- User
See free / used memory in mac os terminal
- Assistant
To check free or used memory on macOS using the Terminal, you can use the
vm_statcommand, or thetopcommand, or even thefreecommand if you have installed it through Homebrew.Using
vm_stat-
Open the Terminal (you can find it in Applications > Utilities > Terminal).
-
Type the following command and press Enter:
vm_statThis will output various statistics about virtual memory. The values you are interested in are the "Pages free" and "Pages active" among others. To convert these values to megabytes, use the following formula:
(Total Pages * Page Size) / 1024 / 1024
-