Make Your Linux Terminal Roast You: Install and Customize Bash‑Insulter
This guide shows how to install the open‑source Bash‑Insulter tool on Linux, configure it to deliver witty insults (or encouraging messages) when a command is not found, and customize its message list by editing the provided script.
Linux users can add a bit of humor to their workflow with Bash‑Insulter , an open‑source CLI utility that replies with random taunts whenever a mistyped command triggers the command not found error.
Installation
Clone the repository from GitHub and copy the script into the system directory:
git clone https://github.com/hkbakke/bash-insulter.git bash-insulter sudo cp bash-insulter/src/bash.command-not-found /etc/Append a check for the script to /etc/bash.bashrc so it runs for every new shell session:
# Bash Insulter
if [ -f /etc/bash.command-not-found ]; then
. /etc/bash.command-not-found
fiActivate the changes immediately:
sudo source /etc/bash.bashrcUsage
After installation, any unknown command will trigger a random insult, for example:
[user@host ~]$ sldkf
Why are you doing this to me?!
-bash: sldkf: command not foundConfiguration
The messages are stored in the bash.command-not-found file you copied to /etc. Edit this file to add, remove, or translate messages. A typical definition looks like:
print_message() {
local messages
messages=(
"Boooo!"
"Don't you know anything?"
"RTFM!"
"Haha, n00b!"
"Wow! That was impressively wrong!"
"Pathetic"
# ... more messages
)
# logic to pick a random entry
}You can replace the insults with encouraging phrases, e.g., 加油哦,棒棒哒,你行的, or write the messages in Chinese.
Notes
The tool works on any Linux distribution that uses Bash as the default shell. Because it modifies system files under /etc, root privileges are required for installation and configuration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
