Discover the ultimate guide to mastering Linux console commands with this comprehensive cheat sheet.
System Information Commands
To view **system information** in a Linux system, you can use commands like “uname -a” to display kernel version and system architecture. “lscpu” provides CPU information, while “lsblk” shows block device information. “free -h” gives an overview of memory usage. Use “df -h” to check disk space. For a detailed list of devices connected to the system, “lshw” is helpful. To see information about the BIOS, “dmidecode” is the command to use.
These commands are essential for understanding your system’s configuration and performance.
Hardware Information Commands
Command | Description |
---|---|
lscpu | Displays information about the CPU architecture and processing units |
lsblk | Lists information about block devices like hard drives and their partitions |
lshw | Provides detailed hardware information about various system components |
lspci | Lists all PCI buses and devices connected to them |
lsusb | Lists USB devices connected to the system |
Performance Monitoring Commands
To check disk space usage, utilize df command. free is handy for monitoring memory usage. netstat helps in viewing network statistics. For detailed process information, ps command is your best friend.
File and Directory Commands
To create a new directory, use mkdir, and to remove a directory, use rmdir. cp copies files, while mv moves them. rm deletes files.
Permissions can be managed with chmod and chown.
Networking Commands
Some useful networking commands in Linux include ifconfig for network interface configuration, ping for checking network connectivity, netstat for displaying network statistics, and traceroute for tracing the route to a network host.