Blog

Latest Articles

Browse the latest tutorials, guides, and practical examples across Linux, DevOps, security, databases, and programming on GoLinuxCloud.

Explore the latest tutorials and guides across Linux, DevOps, programming, and more.

You can also browse content by category below:

  • Linux: Commands, administration, troubleshooting, and system operations
  • DevOps: CI/CD, Kubernetes, containers, and automation
  • Cloud: AWS, Azure, OpenStack, and hybrid cloud administration
  • Programming: Coding tutorials, scripting, and development concepts
  • Security: Ethical hacking, system security, and best practices
  • Databases: MySQL, MariaDB, PostgreSQL, and database management
  • Networking: Network setup, troubleshooting, and protocols
  • Storage: Disk management, file systems, and storage solutions
  • Tools: Useful tools and utilities for productivity

2342 articles

Blog illustration with latest articles, tutorials, guides, and how-to content across Linux and DevOps topics
devops

Operator RBAC Minimum Permissions: ClusterRole, kubebuilder Markers, Audit

A complete guide to designing, generating, and auditing RBAC for Kubernetes operators: how kubebuilder markers generate roles from `+kubebuilder:rbac` comments, the least-privilege principle as it applies to operators, …

Deepak Prasad14 min read
devops

Helm-Based Operator Tutorial Part 2 - Lifecycle, Drift, Hooks, Scope, and the Hard Ceiling

Part 2 of the Helm-based operator tutorial picks up the moment Part 1 ends - you have a deployed operator with a running CR. This guide walks the rest of the pre-built helm plugin (helm.sdk.operatorframework.io/v1) in …

Deepak Prasad30 min read
devops

Kubernetes CRD Version Upgrades with Conversion Webhooks

This step-by-step guide shows how to perform a Kubernetes CRD upgrade from v1alpha1 to v1 with a conversion webhook, using a self-created DemoApp operator. It walks through served and storage version contracts in a …

Deepak Prasad17 min read
programming

Golang function vs method: declaration syntax, receivers, when to use which

Golang function vs method and go method vs function: golang function declaration syntax without a receiver, method golang syntax with value or pointer receiver, function vs method call style, golang methods vs functions …

Deepak Prasad3 min read
devops

How to Avoid Reconcile Loop “Explosions” in Kubernetes Operators

Stop Kubernetes Operator reconcile storms: predicates and generation filters, status-only updates, accidental .spec writes, Owns() fan-out on noisy children, jittered RequeueAfter, workqueue tuning, and why event-style …

Deepak Prasad13 min read
devops

Requeue, RequeueAfter, and Error Handling in controller-runtime

Learn how controller-runtime interprets ctrl.Result, Requeue, RequeueAfter, and returned errors inside Reconcile(). Covers exponential backoff on the workqueue, terminal errors, NotFound and Conflict handling, …

Deepak Prasad10 min read
programming

Bash unshift: prepend to arrays, shift, and pop (with examples)

Bash unshift: prepend to an array or positional parameters, bash shift array / bash array shift, shift vs unshift, and bash pop argument / remove last element. No built-in unshift—use assignment or set --.

Deepak Prasad3 min read
programming

Bash while loop timeout: run until a time (sleep, date, GNU timeout)

Bash while loop timeout and while loop until a deadline: sleep in Linux/Bash, wall-clock end time with date or EPOCHSECONDS, counter + break, and GNU timeout around background jobs.

Deepak Prasad3 min read
programming

Linux convert tabs to spaces; spaces to tabs in shell scripts (Bash)

Linux convert tabs to spaces with expand; convert runs of spaces to tabs with unexpand; tab in bash with $'\t' and printf; unix shell scripts conversion for tab- vs space-delimited text and aligned columns.

Deepak Prasad3 min read
programming

Shell script parallel execution: Bash background jobs and exit status

Shell script parallel execution in Bash: background jobs, wait, and per-PID exit codes. Bash parallelize for loop, parallel shell patterns, and how to run a script on Linux before scaling out.

Deepak Prasad4 min read
programming

JavaScript Exponentiation: ** Operator vs Math.pow (BigInt, precedence, edge cases)

Exponentiation in JavaScript with the ** power operator and Math.pow: numbers, BigInt, right-associativity, unary minus precedence, NaN ** 0, **= compound assignment, and when to prefer Math.pow on older engines. Each …

Olorunfemi Akinlua5 min read
programming

Golang Zap logger: Logger vs SugaredLogger, levels, and request IDs

Zap logger and zap logging with go.uber.org/zap, zap sugaredlogger and sugaredlogger vs Logger, golang zap and zap golang structured fields, zap request id with With or Infow, golang zap logger setup, levels, and …

Antony Shikubu3 min read
programming

Linux login history: view SSH logins, auth logs, and check attempts

Linux login history: view and check login history, login logs, and Linux SSH login history via last, wtmp, auth.log or /var/log/secure, and journalctl. Optional script to summarize successful and failed SSH attempts.

Deepak Prasad6 min read
programming

Grep word after match; awk print after match (Linux)

Grep word after match, grep everything after match, grep characters after match, grep next line after match, and awk print after match on Linux (GNU grep -P with \K, -A, match/substr). Brief patterns for the word before …

Deepak Prasad4 min read
programming

Bash measure time of command and script (execution time, elapsed time)

Bash: measure time of a command, script execution time, and elapsed time (wall clock vs CPU). Use the time builtin, TIMEFORMAT, SECONDS, or EPOCHREALTIME; print duration on exit with trap.

Deepak Prasad3 min read
programming

Bash get script name, path, and directory (get script dir reliably)

Bash get script name, get current script name, get script path, and get script directory (script dir). Use $0, basename, BASH_SOURCE[0], dirname, cd+pwd, and readlink -f on Linux; handle sourced scripts safely.

Deepak Prasad4 min read
programming

Linux: find duplicate files by hash, list them, and remove duplicates safely

Use find with sha256sum (or md5sum) to list identical files on Linux, group by hash, then delete duplicate copies interactively or after a dry-run—plus how “duplicate by name” differs from same content.

Deepak Prasad4 min read
programming

What `echo` does in Linux, what `echo -n` is, and `echo` vs newlines (`\n`)

What echo does on Linux, the echo -n flag (no trailing newline), why echo n is not echo -n, how echo -e handles backslash escapes like \n, and when to use printf instead.

Omer Cakmak3 min read
programming

Bash remove from array: one element, first item, duplicates, and subtract another array

Bash patterns to remove an element from an array, drop the first item, dedupe (bash array remove duplicates), and subtract all values of one array from another using loops or an associative map.

Deepak Prasad4 min read
programming

Bulk create Linux users from a file (`useradd`, passwords, Ubuntu onboarding)

Onboarding-style Bash: read usernames from a file, create multiple Linux users with useradd, optional custom shell and home under /home, per-user passwords with chpasswd, force change on first login, and test with su or …

Deepak Prasad4 min read
programming

Bash progress bar: text bar, script implementation, `pv`, and `dialog`

Build a bash progress bar and bash loading bar in the terminal with carriage return redraws, reusable functions, multi-step jobs, plus pv for pipe byte counts and dialog for a gauge widget.

Deepak Prasad4 min read
programming

Bash counter: loop counters, increment patterns, and script counters (`for`, `while`)

Bash counter patterns: C-style for loop counter, bash while loop counter, increment with (( )) and let, bash for count over a list, and a small script counter over files—plus links to deeper increment and loop guides.

Omer Cakmak3 min read
programming

Bash / Linux: count string or word occurrences in a file (`grep`, `wc`, `awk`)

Count how many times a word or substring appears in a file, count lines and words with wc, whole-word matches with grep -E, and build a frequency table with awk or sort/uniq.

Deepak Prasad5 min read
programming

Linux: top memory and CPU consuming processes (ps, sar, scripts, metrics file)

Find top CPU and memory consuming processes on Linux with ps, top, sar, and pidstat; sample output after controlled stress; Bash scripts that append metrics to a file and ideas for email alerts.

Deepak Prasad5 min read
programming

Bash: check if a string contains text, digits, or a prefix (`[[ ]]`, globs, regex)

Bash patterns to see if a string contains a substring or character, if it is only digits, if it starts with a prefix, and how [[ =~ ]] and globs differ— with quoting, empty-string gotchas, and a short locale note.

Deepak Prasad4 min read
programming

Bash / Linux: check if a process or script is already running (PID, pidof, flock)

Linux and Bash ways to check if a process is running, if a PID still exists, and how to stop a second copy of the same shell script—using kill -0, pidof, pgrep, and flock with sane lock files and cleanup.

Deepak Prasad4 min read
programming

Bash while loop: syntax, `while true`, `read`, `break`, and “do while” in Bash

Bash while loops: `while`/`do`/`done`, any command as the condition, `while true` with `break` and `continue`, `while read` over files, do-while style with `while true`, nested loops, and `break` vs `exit`.

Deepak Prasad6 min read
programming

Bash script arguments and parameters: `$1`, `$#`, `shift`, and parsing flags

Bash script arguments and bash script parameters with $0–$9, $#, "$@", shift, and a while/case example; missing-flag values, $# checks, and links to getopts and forwarding all args.

Deepak Prasad4 min read
programming

Bash check if file exists: [[ -f ]], test, symlinks, and Linux examples

Bash check if file exists with [[ -f ]], test -e, and [ ]; bash if file exists patterns with if/else; symlinks and broken links; check if file exists on Linux with find and stat; quoting, exit codes, and pitfalls.

Deepak Prasad8 min read
programming

Bash trap Ctrl+C (SIGINT): catch, ignore, and cleanup with `trap`

Bash trap Ctrl+C (SIGINT): linux ctrl c signal basics, trap INT and trap ctrl-c patterns, ignore with trap empty string, EXIT cleanup, quoting pitfalls, and subshell vs child-process behavior.

Omer Cakmak4 min read