From a37bcf85ef98e64485768a2aeac351965e29e7bd Mon Sep 17 00:00:00 2001 From: Whisker Jones Date: Wed, 22 May 2024 16:06:03 -0600 Subject: [PATCH] add additional Linux show commands --- tech_docs/linux/linux_show.md | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tech_docs/linux/linux_show.md diff --git a/tech_docs/linux/linux_show.md b/tech_docs/linux/linux_show.md new file mode 100644 index 0000000..8fd7a33 --- /dev/null +++ b/tech_docs/linux/linux_show.md @@ -0,0 +1,55 @@ +# General System Information +- **hostnamectl**: Displays system hostname and identification data. +- **lsb_release -a**: Provides LSB (Linux Standard Base) information about the distribution. +- **cat /etc/os-release**: Shows information about the operating system, such as name, version, and ID. +- **uname -n**: Displays the system's network node hostname. +- **uname -r**: Shows the kernel release. + +# Kernel and System Version +- **cat /proc/version**: Shows the Linux kernel version and related information. +- **uname -a**: Displays kernel version, architecture, and other system information. +- **uname -r**: Displays the kernel release version. +- **uname -v**: Shows the kernel version and build date. +- **dmesg | grep -i linux**: Displays boot-time messages, which often include kernel version information. + +# System Uptime and Load +- **uptime**: Displays system uptime and load averages, useful for monitoring system performance. +- **w**: Shows who is logged on and their activity, along with system uptime. +- **top -n 1 | head -n 10**: Provides a quick snapshot of the system's uptime and load without continuous updating. + +# Hardware Information +- **lscpu**: Shows detailed information about the CPU architecture. +- **lsblk**: Lists information about block devices, such as hard drives and their partitions. +- **lspci**: Lists PCI devices, providing details about internal hardware components. +- **lsusb**: Lists USB devices connected to the system. +- **dmidecode**: Outputs hardware information from the BIOS/UEFI, including system manufacturer, model, and serial number. +- **free -h**: Displays memory usage in a human-readable format. +- **inxi -Fxz**: Provides comprehensive system information, including hardware, network, and software details (requires installation). + +# Network Information +- **ip addr show**: Shows IP addresses and network interfaces. +- **netstat -tuln**: Displays listening sockets and associated programs, useful for network troubleshooting. +- **ss -tuln**: Modern alternative to `netstat`, showing listening sockets and their statuses. +- **ifconfig**: (Deprecated) Displays network interface information; `ip addr` is recommended for newer systems. +- **ip link show**: Shows detailed information about network interfaces. + +# Disk Usage +- **df -h**: Shows disk space usage in a human-readable format. +- **du -h**: Estimates file space usage, providing details on disk usage of files and directories. +- **lsblk -f**: Displays file system information for each block device. +- **df -i**: Shows inode usage of file systems. + +# Process Information +- **ps aux**: Lists all running processes with detailed information, including user, PID, CPU, and memory usage. +- **top**: Provides real-time information about running processes and system resources, sorted by CPU usage. +- **htop**: An interactive version of `top` with a more user-friendly interface for monitoring processes and system resources. +- **pstree**: Displays running processes as a tree, showing parent-child relationships. +- **pgrep -l **: Searches for processes matching a pattern. +- **pidstat**: Provides detailed statistics on CPU, memory, and I/O usage per process. + +# Additional Useful Commands +- **dmesg | less**: Views kernel ring buffer messages. +- **journalctl -xe**: Views the systemd journal for debugging and log information. +- **vmstat**: Provides detailed information on system processes, memory, paging, block I/O, traps, and CPU activity. +- **iostat**: Provides CPU and I/O statistics, useful for identifying bottlenecks. +