深度阅读

How to Check Memory Usage From the Linux Termina

作者
作者
2023年08月22日
更新时间
8.97 分钟
阅读时间
0
阅读量

There are several commands you can use to check memory usage from the Linux terminal. Here are a few examples:

  1. free command - displays the total amount of free and used memory in the system:
free -m

This will display memory information in megabytes.

  1. top command - displays real-time information about processes on the system, including their memory usage:
top

Press the M key to sort processes by memory usage.

  1. htop command - similar to top, but with a more user-friendly interface:
htop
  1. /proc/meminfo - this is a virtual file system that contains information about memory usage:
cat /proc/meminfo

This will display detailed information about memory usage, including total and available memory.

You can choose the command that best suits your needs. I hope this helps you check memory usage from the Linux terminal!

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。