λ suft

File: /home/suft/posts/the-last-prompt-before-root

Size: 123W

Access: (0644/-rw-r--r--)

Created: 2026-03-14 00:00:00 +0000

Tags: til, bash, sudo

Do you live in the terminal? You know that it comes with an OCD for customizing your environment. I learned recently that the sudo prompt is customizable.

[sudo] password for suft:

The default just bothers me. No colour or glyphs. You can fix this mortal ricing sin with an environment variable.

An example of what to append to your ~/.bashrc

export SUDO_PROMPT=$'\e[31msudo\e[0m password → \e[34m%u\e[0m: '