Linux / Bash
Beginner
1 min read
What Is Linux and How It Works
Example
# Check the kernel version
uname -r
# Example output: 6.5.0-45-generic
# Display full system information
uname -a
# Linux hostname 6.5.0-45-generic #45~22.04.1-Ubuntu SMP ...
# Show the Linux distribution name and version
cat /etc/os-release
# NAME="Ubuntu"
# VERSION="22.04.3 LTS (Jammy Jellyfish)"
# List installed package counts (Debian/Ubuntu)
dpkg -l | wc -l
# Check how long the system has been running
uptime
# 14:23:01 up 5 days, 3:12, 2 users, load average: 0.08, 0.10, 0.09
# Display memory usage
free -h
# total used free shared buff/cache available
# Mem: 15Gi 3.2Gi 8.1Gi 312Mi 4.0Gi 11Gi
# Show disk usage of all mounted filesystems
df -h
# Display CPU information
lscpu | grep -E 'Model name|CPU\(s\)|Thread'
Related Resources
Linux / Bash Reference
Complete tag & property list
Linux / Bash How-To Guides
Step-by-step practical guides
Linux / Bash Exercises
Practice what you've learned
More in Linux / Bash