- You can get the best Ring indoor camera I've tested for only $60 with this Presidents' Day deal
- AI chatbots distort the news, BBC finds - see what they get wrong
- The perfect portable power station for all my adventures is $100 off
- The 60+ best early Presidents' Day tech deals live now: Amazon, Walmart, Best Buy, and more
- HPE expands ProLiant server portfolio, boosts AI and security features
Showing memory usage in Linux by process and user
![Showing memory usage in Linux by process and user Showing memory usage in Linux by process and user](https://www.networkworld.com/wp-content/uploads/2025/02/968314-0-63158200-1739383959-shutterstock_2078917720.jpg?quality=50&strip=all&w=1024)
top - 14:22:38 up 12 min, 3 users, load average: 0.02, 0.22, 0.32
MiB Mem : 3784.7 total, 967.8 free, 1249.0 used, 1567.9 buff/cache
MiB Swap: 3784.0 total, 3737.2 free, 46.8 used. 2170.7 avail MemPID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3953 fedora 20 0 1785992 537936 76568 S 0.0 13.9 0:37.63 gnome-software
3590 fedora 20 0 3868704 147920 96512 S 0.0 3.8 0:07.35 gnome-shell
5885 root 20 0 664948 131048 24632 S 0.0 3.4 0:07.94 packagekitd
5444 fedora 20 0 690380 77988 26884 S 0.0 2.0 0:02.11 python
The list will be limited by your window size, but the most significant processes with respect to memory usage will show up at the top of the process list.
If you want to focus on a single user, top can be used much in the same way that it is used above. Just add a username with the -U option as shown below and press the shift+m keys to order by memory usage:
$ top -U nemo
top - 14:28:54 up 18 min, 3 users, load average: 0.01, 0.08, 0.22
Tasks: 242 total, 1 running, 241 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 0.5 sy, 0.0 ni, 99.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3784.7 total, 761.7 free, 1118.5 used, 1904.5 buff/cache
MiB Swap: 3784.0 total, 3741.2 free, 42.8 used. 2298.2 avail MemPID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6906 nemo 20 0 225276 3712 2944 R 1.0 0.1 0:00.10 top
5681 nemo 20 0 30604 16004 10496 S 0.0 0.4 0:00.29 systemd
5702 nemo 20 0 168976 22256 2048 S 0.0 0.6 0:00.00 (sd-pam)
5718 nemo 20 0 17192 7224 5120 S 0.0 0.2 0:00.04 sshd
5732 nemo 20 0 224656 5248 3584 S 0.0 0.1 0:00.06 bash
Using htop
The htop command will run interactively – updating its display of all running processes, along with CPU, memory, and swap usage. You can also specify options when launching htop. For example, you can add a delay between its update using the -d option.