Common Inspection Commands in Linux

The common inspection commands in Linux mainly include system information viewing, resource monitoring, and network status checking.

Common Inspection Commands in Linux

System Information Viewing

uname -a: Displays kernel version, hostname, and other system information.

hostname: View or set the hostname.

cat /etc/redhat-release: View the operating system version (for Red Hat systems).

Resource Monitoring

free -m: View memory usage (in MB).

df -h: Display disk space usage (in a human-readable format).

top/htop: Real-time monitoring of CPU, memory, and process resources.

Network Status Checking

ifconfig/ip addr: View network interface configuration and IP address.

netstat -an: Display network connections, listening ports, etc.

route -n: View the routing table.

Process and Service Management

ps -ef: List all processes.

systemctl status <service_name>: Check the status of a service (requires systemd).

iptables -L: View firewall rules.

Security and Logs

dmesg: View kernel logs.

journalctl: Query systemd logs (requires systemd).

grep PermitRootLogin /etc/ssh/sshd_config: Check SSH remote login permissions.

Other Useful Commands

uptime: View system uptime and load.

lscpu: Display CPU architecture information.

lsmod: List loaded kernel modules.

Leave a Comment