Open jbeadling opened 1 year ago
The uname command is used to print system information like the hostname, the hardware platform, the kernel, etc.
Below we use uname with the -a & -r flags to identify the kernel version
Below we use the df -h --total
command to display the diskspace in human readable format. We can interpret we have a little over 7 gigs of space dedicated to our WSL install.
Below we use the free command to view available space and memory swap space. We use the -g flag to display the memory in gigabytes. The screenshot below shows us that we can 12G of memory and 4G of swap space.
By default the top command will display the top 5 CPU-consuming processes so you just simply run the top command and look at the top 5 processes listed.
Ticket: Get System Information Using Various Commands
Summary
Learn how to use various commands to retrieve system information on a Unix-like operating system. Get insights into CPU, memory usage, disk space, and other system metrics.
Description
Objective: Acquire skills to fetch different types of system information using command-line tools.
Scope:
uname,
df,
free,
andtop.
htop,
lscpu,
andlsmem.
Learning Tasks
Basic System Information:
uname
for getting basic system information like OS type, kernel version, etc.Disk Usage:
df
command.Memory Usage:
free
command for memory-related information.Real-time Metrics:
top
for real-time system metrics.Advanced Tools:
htop,
lscpu,
andlsmem.
Interpreting Output:
Hands-on Practice:
uname
to discover the kernel version.df
and interpret the output.free
to view available memory and swap space.top
and identify the most CPU-intensive process.Troubleshooting:
Learning Goals
Priority