Shell-Tips! Sharpen Your Tech Skills
How to Check, Lint, Format, and Test a Bash Script
How to check syntax, lint, format, and test Bash scripts with bash -n, ShellCheck, shfmt, and Bats, including the exact flags for each tool.
Common Bash Error Messages on Linux and macOS (and How to Fix Them)
What common Bash errors mean and how to fix them: command not found, permission denied, bad substitution, ambiguous redirect, and more.
How To Calculate IP Subnets and Netmasks in Linux and macOS?
How to convert between CIDR prefixes and netmasks, and calculate network, broadcast, and usable host ranges with ipcalc, sipcalc, python3, and Bash.
How to Master String Pattern Matching using Bash Character Classes
Exploring the power of GNU bash character classes for efficient pattern matching in regular expressions, with an example script to generate an ASCII table.
Top 10 Bash Pitfalls You Don't Want to Make
This blog post provides an informative guide to common pitfalls in GNU Bash shell and offers practical tips and solutions for avoiding or resolving them.
5 Simple Steps On How To Debug a Bash Shell Script
Learn how to quickly debug scripts in Bash with those 5 simple steps that use some of the Bash shell special properties.
A Complete Guide to the Bash Environment Variables
A complete guide on the Linux Bash environment variables with details on how to set, unset, and use the specials shell variables or define custom environment variables.
How To Make A Custom Bash Shell Prompt
Learn how to customize your shell prompt and the specificity of the Bash Prompt variables PROMPT_COMMAND, PROMPT_DIRTRIM, PS0, PS1, PS2, PS3, and PS4.
The Most Useful Bash Shortcuts That You Will Want To Use
A detailed review of the most useful Terminal and Bash shortcuts to improve your productivity when typing command-lines and how to customize the ones you don't like.
The Complete How To Guide of Bash Functions
Learn how to write shell scripts with bash functions. This guide includes examples and best practices on how to define, call, and debug functions in bash.
How To Create Simple Menu with the Shell Select Loop?
The select loop is not a regular shell loop. It can be used in Bash to generate a simple menu from which a user can select numbered options.
What is the Right Way to do Bash Loops?
Looping over a list of numbers or words is a building block in shell scripts. Learn how to write Bash loops, including for loop, while loop, and until loop.
What is the Best Way to Count Files in a Directory?
Learn how to count the number of files in a directory using the Linux command line ls, find, and a native bash shell solution with globs and arrays.
5 Mistakes To Avoid For Writing High-Quality Bash Comments
Adding comments in your Bash scripts is necessary to ensure maintainability over time. This post covers 5 Bash comments mistakes to avoid in your shell scripts.
How To Script Error Free Bash If Statement?
Learn how to script a Bash If statement with the then, else, and else if / elif clauses. Includes Bash conditional expressions and common pitfalls to avoid.
What are the Differences Between Vi and Vim?
Vi vs Vim: A review of the main differences between the Vi/Ex POSIX standard and the Vim implementation.
sudo: no tty present and no askpass program specified
Learn what is askpass and how to solve the 'sudo: no tty present and no askpass program specified' error when using sudo to execute a command.
What is the Bash Null Command?
Learn about the Bash null command, also known as the POSIX shell colon command. This post cover concrete use cases and pitfalls to avoid.
How To Format Date and Time in Linux, macOS, and Bash?
This guide covers how to format date and time in Linux, Mac, and the Bash shell. Includes how to do date shell operations like adding days or comparing dates.
What's New in Focal Fossa Ubuntu 20.04 LTS?
Ubuntu 20.04 LTS is available for download. Find out some of the major security and performance improvements from this new distribution, including the introduction of WireGuard VPN, upgraded suite of software packages, faster boot time, etc.
Mastering Linux with Tips and Tricks
Collection of Blog posts for Mastering Linux. This section covers the basics of manipulating and formatting dates with GNU Date or in Bash, tuning sysctl, common sudo and tty errors, Ubuntu tips and news, and more.
Must Have Cheat Sheets
Collection of cheatsheets with all the essentials you need from Bash to Vi/Vim and Linux.
How and When to Use the Dot Command in Bash?
Learn the difference between the dot command (.) and a dot file notation. This post cover how and when you should leverage the dot command to execute a Bash script.
Running Bash script with Ubuntu on Windows 10 using WSL
No-hassle! Learn how to run Bash on Windows by installing your favorite Linux distribution natively on Windows 10 using Windows Subsystem for Linux, aka WSL.
What's New in GNU Bash 5?
Bash version 5 is generally available and comes with some important improvements and new features like BASH_ARGV0, EPOCHSECONDS, and EPOCHREALTIME.
How To Do Advanced Math Calculation Using bc?
Learn how to use the GNU Linux bc command line to do math arithmetic and algebra with square root, sine, cosine, tangent, arctangent, bessel, and more.
Disown a running shell process and reattach it to a new screen
This post cover the basics of shell jobs management and terminal screen sessions. It covers how to detach a running job from your current shell and how to attached it to a new TTY session.
Redirecting a stdout to a file using sudo and tee
Learn how to address a permission denied error when trying to edit a file on Linux and work around some sudo issues. This post include a simple vim tips to save changes to a file with sudo right from your editor.
sudo: sorry, you must have a tty to run sudo
Learn what is a tty and how to solve 'sudo: sorry, you must have a tty to run sudo' error when using ssh to execute a sudo remote command.
Linux sysctl configuration and tuning script
Legacy post providing a custom script to auto-tune your Linux kernel and sysctl options based on your server specifications.
Using losetup and dd to secure sensitive data
Legacy post on using dd and losetup to encrypt a block device and secure sensitive data.
Choosing a filesystem for your Linux/Unix server
Review of various filesystems available on Linux and how to choose one for your workstation or production server.
Bash Quick References: A One Page Cheat Sheet
A one-page of Bash quick references, aka cheat sheet, to help you script faster and better. Good material from newbies to regular basher.
Two common errors while starting Apache server on Linux
Legacy post discussing some common errors when starting or running an Apache server on Linux.
How to Reload or Change your current Shell?
Learn the basic steps to reload your Linux shell to apply your recent configurations changes. This post cover the POSIX exec builtin command in Bash and the GNOME shell.
Fine tuning a Linux Apache MySQL PHP (LAMP) server
Legacy post discussing how to tune a production system using Linux, Apache, MySQL, and PHP (aka LAMP).
Vi and Vim Quick References: A One Page Cheat Sheet
A one-page cheat sheet of Vi/Vim quick references to speed-up your productivity with your favorite terminal based text editor. Great for casual Vi and Vim users to daily coders.
Removing ^M in imported Windows files
Learn how to quickly and easily handle files with newline and carriage return between linux, mac, and windows. This post will explain how to remove or replace the often annoying ^M character.
How to manage an idle ssh connection ?
Quick and simple tips on how to handle an idle remote ssh connection from your terminal.
Raid 5 Monitoring on Dell Power Edge 2650 with afacli
Case study on monitoring a Raid 5 array on Dell PowerEdge 2650 with a PERC3/Di by using afacli on Debian.
How To Find Quickly A Bash Command Type?
Learn how to find out the type of a shell command and the definition of an alias or function by using the type or command Bash builtins.
