Articles by Deepak Prasad
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.
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.
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.
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.
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.
Git Unstage Files: git restore --staged, git reset HEAD, and git rm --cached
Git unstage command reference for git restore --staged, git reset HEAD, git rm --cached, folders, and full index clears — with status checks and edge cases before commit.
Git Commit --Amend: Fix the Last Commit (Files, Author, Date)
Use git commit --amend to add forgotten files, fix the author or date on the last commit, amend without changing the message, recover from a bad amend with reflog, and safely force-push a rewritten commit.
How to Change a Git Commit Message (Last, Older, or Already Pushed)
Change the last, older, multiple, or already-pushed Git commit messages using amend and interactive rebase, with safe force-push and recovery examples.
Git Undo Add: Unstage Files After git add
Undo git add without losing edits: read git status -sb, unstage one file with git restore --staged, undo git add . with git restore --staged . or git reset, and handle staged deletions before commit. For full unstage …
Git Merge vs Rebase: When to Use Each
Compare git merge and git rebase on the same branch split: merge commits preserve branch history, rebase replays commits for a linear log, fast-forward merges skip the merge commit, and pull --rebase vs merge pull change …
Git .gitignore Examples: Patterns, Folders, and Fixes
Use .gitignore to hide build output, logs, and env files from git status: wildcard patterns, folder rules, negation with !, git check-ignore debugging, git rm --cached for already-tracked files, and local or global …
Git Detached HEAD: Fix, Save Work, and Recover Commits
Fix Git detached HEAD: recognize HEAD (no branch), inspect an old commit with git switch --detach, save work with git switch -c, return with git switch main, and recover orphaned commits using git reflog.
Git List Branches: Local, Remote, and All Branches
List Git branches by goal: git branch for local names, git branch -r for remote-tracking branches after fetch, git branch -a for both, and git branch -vv for upstream tracking — with filter, sort, and prune examples.
Git Revert to Previous Commit: Reset, Revert, or Checkout
Go back to a previous Git commit safely: git revert for pushed history, git reset for local-only branch moves, git switch --detach to inspect an old snapshot, and git restore --source for one file — with a decision table …
Git Reset: Soft, Mixed, and Hard Examples
Use git reset --soft, --mixed, and --hard to move HEAD, unstage with git reset HEAD file, discard tracked edits with git reset --hard HEAD, or match origin after git fetch — with the smallest mode for each goal.
Git Discard Changes: Restore, Reset, and Clean Local Edits
Discard uncommitted Git changes after reading git status: git restore for unstaged edits, git restore --staged --worktree for one MM file, git reset --hard HEAD for all tracked files, and git clean for untracked paths.
Git Fix: fatal: couldn't find remote ref main
Fix "fatal: couldn't find remote ref main" by listing remote branches with git ls-remote --branches, using the branch name the server publishes, or pushing the branch when it exists only locally.
Git Error: Cannot Delete Branch Checked Out or Used by Worktree
Fix "cannot delete branch checked out at" and "cannot delete branch used by worktree" by checking git branch and git worktree list, switching away or freeing the linked worktree, then deleting with git branch -d.
Pulling is not possible because you have unmerged files
Fix "Pulling is not possible because you have unmerged files" with git status, resolve conflict markers, git add, git commit or --continue, or abort the in-progress merge, rebase, or cherry-pick.
Git Rebase Explained: Examples, Conflicts, and When to Use It
Git rebase explained with ASCII flow diagrams, feature-branch replay onto main, conflict resolution with git status, remote rebase, force-with-lease, interactive rebase, and when to use rebase instead of merge.
Best Automation Testing Tools: Open Source and Linux-Friendly
Compare the best automation testing tools in {year} for Linux and CI pipelines, including Playwright, Selenium, Cypress, Appium, pytest, REST Assured, Robot Framework, k6, and JMeter, with guidance on test types, …
Best Open Source APM Tools for Application Performance Monitoring
Compare the best open source and self-hosted application performance monitoring tools in {year}, including SigNoz, Apache SkyWalking, OpenObserve, Coroot, Glowroot, and the Grafana stack, with guidance on OpenTelemetry …
Configure BIND Primary and Secondary DNS on RHEL Linux
Configure BIND primary and secondary DNS on RHEL-family Linux with allow-transfer, slave zones, named-chroot on Rocky Linux 8, and dig verification after AXFR zone replication.
Setgid in Linux: chmod g+s, 2775 and Practical Examples
Learn Linux setgid on directories and executables: chmod g+s, 2775 group inheritance, write and plocate examples, s vs S, find, and when to use setgid on shared folders.
Setuid in Linux: chmod u+s, 4755 and Practical Examples
Learn Linux setuid on executables: what chmod u+s and 4755 do, why passwd uses setuid, lowercase s vs uppercase S, how to find setuid files, and when not to add your own.
sysctl Command in Linux: Read, Write and Load Kernel Tunables
sysctl reads and writes kernel tunables exposed under /proc/sys. Use it to inspect dotted parameter names, set runtime values with -w, filter keys with -a -r, and load drop-in files with -p or --system.
Where Is OpenSSL Config, Certificates, and Libraries? (Linux & Windows)
Find where OpenSSL keeps openssl.cnf, trust-store certificates, libssl libraries, and the openssl binary on Linux and Windows. Use openssl version -d, which openssl, ldconfig, and OPENSSL_CONF when paths differ between …
Tech Savvy Students: Mastering Education with Linux Apps
Learn how Linux applications are empowering tech-savvy kids to transform the classroom. Also, understand how to use this excellent software for education.
Machine Learning in Video Games
machine learning has discovered computer video games as an interesting and rewarding area. Also, the video game market has become a prominent and proven global industry.
Create, Copy, Move and Delete Files in Linux
Create, copy, move, rename, and delete files and directories in Linux with touch, mkdir, cp, mv, rm, and rmdir—plus wildcards, brace expansion, and safe verification with ls, stat, and du.

