Skip to main content

Troubleshooting Linux Servers.

Below are the commands useful for troubleshooting Linux Servers.


● top - Display running processes and system usage. 

● htop - Interactive process viewer. 

● ps - Display current processes.

● df - Show disk space usage.

● du - Show directory space usage. 

● free - Show memory usage. 

● uptime - Show system uptime. 

● uname - Show system information. 

● whoami - Display the current logged-in user. 

● lsof - List open files and associated processes. 

● vmstat - Report virtual memory statistics. 

● iostat - Report I/O statistics.

● netstat - Display network connections and routing tables. 

● ifconfig - Display or configure a network interface. 

● ping - Check network connectivity. 

● traceroute - Track the route packets take to a destination.

● curl - Transfer data from or to a server.

● wget - Download files from the internet. 

● ssh - Secure shell to a remote server. 

● telnet - Connect to a remote machine. 

● nslookup - Query DNS records. 

● dig - DNS lookup utility. 

● iptables - Configure firewall rules. 

● firewalld - Firewall management (CentOS/RHEL)

● kill - Send a signal to a process. 

● killall - Kill processes by name. 

● pkill - Kill processes by pattern matching. 

● bg - Move a job to the background. 

● fg - Bring a job to the foreground. 

● jobs - List background jobs. 

● fdisk - Partition a disk. 

● mkfs - Make a filesystem. 

● mount - Mount a filesystem. 

● umount - Unmount a filesystem. 

● lsblk - List block devices. 

● blkid - Print block device attributes. 

● fdisk: Manage disk partitions. 

● awk - Pattern scanning and processing. 

● sed - Stream editor for modifying text. 

● sort - Sort lines of text files. 

● uniq - Report or omit repeated lines. 

● cut - Remove sections from each line of files. 

● wc - Word, line, character count. 

● tr - Translate or delete characters. 

● nl - Number lines of files.

● dmesg - Print or control kernel ring buffer. 

● journalctl - Query the systemd journal. 

● logger - Add entries to the system log. 

● last - Show listing of last logged-in users. 

● history - Show command history. 

● tail -f - Monitor logs in real time. 

● tar - Archive files. 

● rsync - Synchronize files and directories. 

● tar: Archive files. tar -cvf archive.tar /path/to/files # Create an archive tar -xvf archive.tar


Comments