1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Add Show Used And Available System Memory as a Linux TIL

This commit is contained in:
jbranchaud
2023-03-04 09:46:51 -06:00
parent 5a72dcfb95
commit a09ec39aa1
2 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
# Show Used And Available System Memory
The `free` command will display the total RAM on your system as well as how
much of it is used and how much is still freely available.
```bash
$ free
total used free shared buff/cache available
Mem: 1000260 166004 552808 14440 281448 664724
Swap: 0 0 0
```
The default output format of `free` is not very readable though. To make it
more human readable, you can add the `-h` (_human_) and `--si` (_International
System of Units_) flags.
```bash
$ free -h --si
total used free shared buff/cache available
Mem: 976M 162M 547M 14M 266M 649M
Swap: 0B 0B 0B
```
See `man free` for more details.