To know the total Memory available on a Linux System you can take a look into /proc/meminfo file.
root@ubuntu # cat /proc/meminfo
MemTotal: 4026792 kB
MemFree: 2559056 kB
MemAvailable: 3236968 kB
Buffers: 39764 kB
Cached: 1061340 kB
SwapCached: 0 kB
Active: 356600 kB
Inactive: 905332 kB
Active(anon): 79516 kB
Inactive(anon): 411764 kB
Active(file): 277084 kB
Inactive(file): 493568 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 1048572 kB
SwapFree: 1048572 kB
Dirty: 8 kB
Writeback: 0 kB
AnonPages: 159336 kB
Mapped: 218656 kB
Shmem: 330452 kB
KReclaimable: 69836 kB
...
Hugetlb: 0 kB
The value next MemTotal is the total memory (RAM) you have on the System in Kb.

You can also make use of the free command to know the memory details,
root@linux # free -k
total used free shared buff/cache available
Mem: 4026792 294548 2561276 330452 1170968 3239216
Swap: 1048572 0 1048572
root@linux:/# free -m
total used free shared buff/cache available
Mem: 3932 289 2499 322 1143 3161
Swap: 1023 0 1023
root@ linux:/# free -g
total used free shared buff/cache available
Mem: 3 0 2 0 1 3
Swap: 0 0 0
-
Have Questions? Post them here!
More Posts related to Linux,
- [Fix] Linux - bash: useradd: command not found
- Calculate days between dates using dateutils ddiff command
- pwd Command - Print Working Directory
- Rename a directory using Linux/Unix command
- How to go to the End of File in Nano Editor
- How to tar.gz a directory or folder Command
- How to remove/delete a directory in Linux/macOs
- How to Display content of a file in Terminal Screen?
- ls command sort by file size [Linix/UNIX/macOS/bash]
- How to Copy Entire Directory to another Directory in Linux
- 3 ways to clear screen on Linux Terminal
- Command to check Last Login or Reboot History of Users and TTYs
- How to check uptime of Linux/Unix/macOS system/server using console command?
- How to backup a file in Linux/Unix
- Command to know the installed Debian version?
- Check SSH/OpenSSH version Command
- 3 Commands to stop Nginx Server
- Linux: Create a New User and Password and Login Example
- How to install npm on Ubuntu
- How to List All Users in Linux
- How to Get the List of Shells on Linux
- Fix - ssh-copy-id no identities found error
- Installing and using unzip Command to unzip a zip file using Terminal
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- zsh hello world example
More Posts:
- zsh: command not found [fix] macOS - zsh
- Convert String to int in Java - Java
- Where is .zshrc file located in macOS - MacOS
- Reading .xls and .xlsx Excel file using Apache POI Java Library - Java
- Encode/Decode URL Query String in Notepad++ - NotepadPlusPlus
- Parse XML file in Java using DOM Parser - Java
- Youtube spacebar not working in search on macOS Safari - MacOS
- How to change SharePoint Online site collection or subsite URL address - SharePoint