Shell prompt & root indicator
Pick a prompt style or build your own, with a symbol that shows # when you are root.
Shell prompt & root indicator
Kubexer Terminal can style your prompt the same way on every host, locally and over SSH, so you always see who you are, where you are and whether the last command worked. It also makes it obvious when you're root.
Choose a prompt style
Open Settings → Terminal → Shell prompt and pick one:
- Keep my shell's prompt — use whatever your shell config sets.
- A preset: Arrow, Minimal, Classic, Bracket, Two-line or Path only.
- Custom — write your own from tokens.
The preview at the top of the page updates as you choose. The change applies to terminals you open from then on.
Your shell config is always loaded first; the prompt style only changes how the prompt looks. To override a custom prompt your shell config already sets, tick Apply even if my shell config already sets a custom prompt.
Custom prompt tokens
| Token | Shows |
|---|---|
{user}, {host} |
user and host name |
{path} |
current folder, with your home shortened to ~ |
{dir} |
only the current folder's name |
{symbol} |
❯, green after success and red after an error; # as root |
{sign} |
$, or # as root |
{newline} |
a line break |
{red} … {gray}, {reset} |
colours: black, red, green, yellow, blue, magenta, cyan, white, gray; {reset} ends the colour |
Example: {cyan}{user}@{host}{reset} {blue}{path}{reset}{newline}{symbol}
The root indicator
{symbol} and {sign} switch to # when the shell runs as root, for example after sudo -i or su -, in zsh, bash and POSIX shells such as sh, ash and dash. Every preset uses one of them, so a root shell never looks like a normal one.
Good to know
- Prompt styling works in bash, zsh and POSIX shells (
sh,ash,dash). In POSIX shells the path isn't shortened to~, and{symbol}doesn't change colour with the exit status. - Command blocks rely on the same shell integration, whichever style you choose.