linux

Troubleshoot High Memory Usage in Linux

Troubleshoot Linux high memory usage by reading free and MemAvailable, ranking processes with ps and pidstat, checking swap and memory pressure, inspecting kernel slab usage, and deciding when low free RAM is normal …

Deepak Prasad9 min read
linux

Troubleshoot High I/O Wait in Linux

Troubleshoot Linux high iowait with mpstat and top, find the busy disk with iostat, name I/O-heavy processes with pidstat, check D state and swap activity, and match symptoms to the real storage bottleneck.

Deepak Prasad9 min read
linux

Troubleshoot High CPU Usage in Linux

Troubleshoot Linux high CPU usage with top, ps, mpstat, and pidstat to find runaway processes, read per-core utilization, split user and system time, inspect threads, and decide whether the workload is legitimate or a …

Deepak Prasad10 min read
linux

Troubleshoot High Load Average in Linux

Troubleshoot Linux high load average by comparing load to CPU count, reading mpstat and iowait, finding D state processes, checking disk and NFS blocking I/O, and identifying whether CPU, I/O, or locks are the …

Deepak Prasad9 min read
linux

Troubleshoot Default Routes in Linux

Troubleshoot Linux default route problems by reading ip route show default and ip route get, understanding route metrics, removing wrong gateways, fixing multiple default routes, and making the correct gateway persistent …

Deepak Prasad9 min read
linux

Troubleshoot Slow Network Speed in Linux

Troubleshoot Linux slow network speed by measuring throughput with curl and iperf3, checking latency and packet loss, verifying ethtool link speed and duplex, reading interface drops, testing MTU, reviewing routes, and …

Deepak Prasad8 min read
linux

Troubleshoot Packet Loss in Linux

Troubleshoot Linux packet loss by confirming drops with ping statistics, locating the failing hop with mtr, reading interface error counters, checking ethtool link state, testing MTU with ping, and comparing local LAN …

Deepak Prasad11 min read
linux

Fix NetworkManager Device Unmanaged on Linux

Fix NetworkManager device unmanaged on Linux by reading nmcli device state and reason codes, checking unmanaged-devices rules and NM_CONTROLLED, marking interfaces managed, and verifying with nmcli reload.

Deepak Prasad8 min read
linux

Fix Destination Host Unreachable on Linux

Fix destination host unreachable on Linux by identifying which host sent the ICMP error, checking interface IP and routes, resolving ARP neighbor failures, and restoring a reachable default gateway.

Deepak Prasad10 min read
linux

Fix Connection Refused on Linux

Fix connection refused on Linux for ssh, curl, and custom TCP ports by confirming host reachability, checking systemd and ss listeners, bind addresses, firewalld rules, and verifying with nc or curl.

Deepak Prasad10 min read
linux

Fix Linux: Can Ping IP but Not Hostname

Fix Linux hosts that ping IP addresses but not hostnames by confirming routing, testing DNS with getent and dig, checking resolv.conf and NetworkManager, and restoring working nameservers.

Deepak Prasad8 min read
linux

Fix No Route to Host on Linux

Fix no route to host on Linux for ssh, curl, and other TCP clients by checking ip route get, gateway and ARP neighbors, tracepath, and firewalld REJECT rules that return EHOSTUNREACH.

Deepak Prasad9 min read
linux

Fix Network Is Unreachable on Linux

Fix network is unreachable on Linux by checking link state and IP addresses, reading ip route get, restoring a missing default gateway, and correcting NetworkManager routes on RHEL, Ubuntu, and other distributions.

Deepak Prasad9 min read
linux

Fix Temporary Failure in Name Resolution on Linux

Fix temporary failure in name resolution on Linux by confirming IP connectivity, testing DNS with getent and dig, checking resolv.conf and NetworkManager DNS servers, and applying a working resolver configuration.

Deepak Prasad9 min read
linux

How to Find and Fix Memory Leaks in Linux Applications

Read LeakSanitizer and Valgrind reports down to the line that owns the memory, use the flags that add detail, attribute growth with Massif, and query a running process with vgdb so you fix the cause instead of only …

Omer Cakmak40 min read
linux

How to Install libc.so.6 on Linux (glibc Package, Not a Download)

Diagnose libc.so.6 errors by message type — GLIBC_2.xx not found, cannot open shared object file, wrong ELF class, or damaged system libc — then fix with the matching glibc package, multilib, rebuild, container, or …

Omer Cakmak11 min read
linux

Configure Fail2ban to Protect SSH on Linux

Install Fail2ban, enable the sshd jail with sane bantime and ignoreip values, verify bans after failed SSH logins on RHEL and Debian, and unban trusted client addresses when needed.

Omer Cakmak9 min read
linux

Found a Swap File by the Name: Fix Vim .swp Warnings (E325)

Fix Vim E325 Found a swap file by the name by reading the .swp prompt, recovering after a crash, or removing a stale swap file once no editor owns it — not Linux swap memory from mkswap.

Omer Cakmak7 min read
linux

Fix SSH No Route to Host: Routing, Firewall, and sshd Checks

Diagnose SSH no route to host with TCP port tests, ip route get, remote firewalld and sshd checks, and learn when the message means a firewall REJECT instead of a missing route.

Omer Cakmak8 min read
linux

Run Multiple Commands Over SSH on Linux

Chain remote commands over SSH with semicolons, &&, subshells, bash -s, and here documents, and pick the pattern that matches whether every step must run or stop on failure.

Omer Cakmak7 min read
linux

Long-Running Commands Over SSH: Keep Jobs Running After Disconnect

Run backups, builds, and other long jobs over SSH with explicit I/O redirection, nohup, setsid, tmux, or disown so work continues after the terminal closes and output lands in a log you can read later.

Omer Cakmak8 min read
linux

Enable UTF-8 Locale on Linux

Set a UTF-8 system locale with localectl or update-locale, confirm with locale and locale charmap, and fix missing-locale warnings on RHEL and Debian-family Linux.

Omer Cakmak5 min read
linux

Fix RPM Failed Dependencies on Install and Remove

Fix error Failed dependencies when installing a local RPM with dnf install, list requirements with dnf repoquery, install offline RPM bundles, and remove packages safely on RHEL family systems.

Omer Cakmak6 min read
linux

Enable Persistent Logging in systemd-journald on Linux

Store systemd-journald logs on disk under /var/log/journal with a Storage=persistent drop-in, restart systemd-journald, flush runtime logs with journalctl, and verify earlier boots with journalctl --list-boots.

Omer Cakmak6 min read
linux

Idle SSH Sessions: Disconnect or Keep Them Alive on Linux

Set ClientAliveInterval and ClientAliveCountMax on sshd to drop unresponsive SSH clients, use ServerAliveInterval on the OpenSSH client to keep sessions alive through NAT, and understand how TCPKeepAlive differs.

Omer Cakmak7 min read
linux

Detect Rootkits on Linux with rkhunter

Install rkhunter from EPEL or apt, update its signature database, baseline file properties with propupd, run a non-interactive check, and interpret warnings in rkhunter.log on RHEL and Debian-family hosts.

Omer Cakmak6 min read
linux

Create a systemd Service Unit in Linux

Create a custom systemd .service unit under /etc/systemd/system/, explain Unit Service and Install sections, start and enable it with systemctl, and verify with status and journalctl.

Omer Cakmak6 min read
linux

How to Perform tar Incremental Backup on Linux

Take GNU tar listed-incremental backups with a snapshot file, create level 0 and level 1 archives, inspect Y and N file status, and restore by applying the full backup then each incremental in order.

Omer Cakmak7 min read
linux

SSH Multiplexing on Linux: Share One Connection

Reuse one authenticated SSH connection for later ssh, scp, and sftp sessions with ControlMaster, ControlPath, and ControlPersist on the OpenSSH client.

Omer Cakmak10 min read
linux

How to Copy a Directory Over SSH on Linux

Copy a directory and its contents between Linux hosts with scp -r and rsync -av over SSH, verify the remote layout, and avoid common path mistakes with trailing slashes.

Omer Cakmak6 min read