Introduction
This guide provides a comprehensive overview of essential network and system commands used for monitoring, troubleshooting, and managing Linux systems. These commands help you gather information about network interfaces, active connections, system resources, and more.Network Commands
Display Network Interface Information for All Interfaces
To display detailed information about all network interfaces:List All Active Network Connections (TCP and UDP)
To view all active network connections, including TCP and UDP:List Active TCP Connections
To view only active TCP connections:Display Network Statistics for Ports
To show network statistics related to ports:Perform DNS Lookup for a Domain Name
To perform a DNS lookup for a specific domain:Perform DNS Query Using the dig Command
To query DNS records for a domain:
System Commands
Display System Uptime
To show how long the system has been running:Display Who Is Currently Logged In and What They Are Doing
To view a list of logged-in users and their activities:Display System Resource Usage, Processes, and Their Resource Consumption
To display system resource usage and active processes:Display System Memory Usage
To view current memory usage:List Open Files and the Processes That Opened Them
To list all open files and their associated processes:List Block Devices (Disk Drives and Partitions)
To list all block devices, such as disks and partitions:Display System Information, Including the Kernel Version
To show detailed system information and kernel version:Display Information About the Operating System Distribution
To show details about the operating system distribution:List All Running Processes
To list all currently running processes:List All Processes (Including Those Owned by Other Users)
To list all processes, including those owned by other users:List Processes in a Tree-Like Format
To view processes in a hierarchical (parent-child) format:List Background Jobs
To list jobs running in the background:Check for Running Processes Containing “php” in Their Names
To find running processes with “php” in their names:Display System Hostname and Related Information
To view the system hostname and related settings:Conclusion
These commands are essential for managing and troubleshooting Linux systems. They provide valuable insights into network status, system resource usage, and active processes, helping you effectively monitor and maintain your system.This guide covers a range of commands to help you manage and troubleshoot Linux systems, including network-related commands, system resource commands, and process management commands.
