0% found this document useful (0 votes)
2 views1 page

Getting Basic System Information in Bash

The document provides an overview of basic Bash commands for retrieving system information, including 'uname' for system details, 'hostname' for the current hostname, 'df' for disk space usage, 'du' for directory space usage, and 'free' for memory usage. Each command includes examples and options for displaying information in a human-readable format. These commands are essential for gaining quick insights into system configuration and resource usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Getting Basic System Information in Bash

The document provides an overview of basic Bash commands for retrieving system information, including 'uname' for system details, 'hostname' for the current hostname, 'df' for disk space usage, 'du' for directory space usage, and 'free' for memory usage. Each command includes examples and options for displaying information in a human-readable format. These commands are essential for gaining quick insights into system configuration and resource usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

# Getting Basic System Information in Bash

This file introduces commands for retrieving fundamental details about your system.

1. uname: Print System Information


- Displays basic system information.
- `uname`: Shows the operating system name.
- `uname -a`: Shows all system information (kernel name, hostname, kernel release, kernel
version, machine hardware name, processor type, hardware platform, operating system).
- Example: `uname`, `uname -a`

2. hostname: Show or Set the System's Hostname


- Displays the current hostname of your system.
- `hostname`: Shows the hostname.
- Example: `hostname`

3. df: Display Disk Space Usage


- Shows the disk space usage of file systems.
- `df -h`: Displays disk space in a human-readable format.
- Example: `df -h`

4. du: Display Directory Space Usage


- Shows the disk space used by directories and files.
- `du -h`: Displays disk space in a human-readable format.
- `du -sh <directory>`: Shows the total size of a directory.
- Example: `du -h .`, `du -sh Documents`

5. free: Display Amount of Free and Used Memory


- Shows information about the system's memory usage (RAM and swap).
- `free -h`: Displays memory information in a human-readable format.
- Example: `free -h`

These commands provide quick insights into your system's basic configuration and resource
usage.

You might also like