Operations 4 min read

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.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Make Your Linux Terminal Roast You: Install and Customize Bash‑Insulter

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
fi

Activate the changes immediately:

sudo source /etc/bash.bashrc

Usage

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 found

Configuration

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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

customization
Liangxu Linux
Written by

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.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.