Linux commands for memory use. Last edit: Wed Oct 23 4:38PM.
May change this later to add tmux(1). 
Memory Information
- 
free -h: Shows free and used memory.
- 
cat /proc/meminfo: Displays detailed memory usage.
Real-time Monitoring
- 
top: Real-time system resource usage.
- 
htop: Interactive process viewer.
Process Memory Usage
- 
ps aux --sort -rss: Lists processes by memory usage.
System Activity Reports
- 
vmstat 1: Reports on processes, memory, and more.
- 
sar -r: Reports memory usage.
Comprehensive System Stats
- 
dstat -m: Provides memory usage stats.
BASIC THINGS ABOUT LINUX & MAC-OS
Linux
- 
Open-Source Nature: Linux is free and open-source, allowing users to modify and distribute the code. - 
Command: cat /etc/os-release(Displays OS information)
 
- 
- 
Customization: Linux offers extensive customization options for users. - 
Command: lsb_release -a(Displays Linux distribution information)
 
- 
- 
Package Management: Linux distributions use package managers to install software. - 
Command: apt-get install <package_name>(Installs a package using APT)
 
- 
- 
Multi-User Support: Linux supports multiple users with different permissions. - 
Command: who(Displays who is currently logged in)
 
- 
- 
Stability: Linux is known for its stability and reliability. - 
Command: uptime(Displays system uptime)
 
- 
- 
Security: Linux has robust security features. - 
Command: sudo(Provides superuser privileges)
 
- 
- 
Networking: Linux has advanced networking capabilities. - 
Command: ifconfig(Displays network interface configuration)
 
- 
- 
File System: Linux supports various file systems. - 
Command: df -h(Displays disk space usage)
 
- 
- 
Scripting: Linux supports various scripting languages. - 
Command: bash(Starts a Bash shell)
 
- 
- 
Portability: Linux can run on various hardware platforms. - 
Command: uname -a(Displays system information)
 
- 
macOS Darwin
https://www.matisse.net/OSX/darwin_commands.html
- 
Unix-Based: Darwin is the core of macOS, based on BSD and Mach technologies. - 
Command: uname -a(Displays system information)
 
- 
- 
Open-Source: Darwin is open-source, allowing developers to access and modify the code. - 
Command: open /System/Library/CoreServices(Opens the Core Services directory)
 
- 
- 
Advanced Networking: Darwin supports advanced networking features. - 
Command: networksetup -listallnetworkservices(Lists all network services)
 
- 
- 
Apache Web Server: Darwin includes the Apache web server. - 
Command: apachectl -v(Displays Apache version)
 
- 
- 
File System Support: Darwin supports both Mac OS and Unix file systems. - 
Command: diskutil list(Lists all disks and partitions)
 
- 
- 
X Window System: Darwin supports the X Window System. - 
Command: open -a XQuartz(Opens XQuartz)
 
- 
- 
PowerPC and Intel Compatibility: Darwin runs on both PowerPC and Intel-compatible platforms. - 
Command: sysctl hw(Displays hardware information)
 
- 
- 
Core Services: Darwin includes various core services. - 
Command: launchctl list(Lists loaded launch daemons and agents)
 
- 
- 
Apple Technologies: Darwin integrates Apple technologies. - 
Command: defaults read(Reads macOS user defaults)
 
- 
- 
Portability: Darwin can run on various hardware platforms. - 
Command: system_profiler(Displays detailed system information)
 
- 
 
                     Write a comment
 Write a comment