linux:bash:prompt-on-newline
This is an old revision of the document!
Bash prompt on new line
When you have a long path in the prompt, only few characters could be left to write the command before going on the next line.
With this prompt instead, the command starts from a new line regardless of the path length.
Try it pasting this in a terminal
export PS1="┌──(\u@\h)-[\[\w\]] └─\$ "
Make it permanent with
nano ~/.bashrc
adding at the end of the file
PS1="┌──(\u@\h)-[\[\w\]] └─\$ "
(I don't care about colors)
linux/bash/prompt-on-newline.1732032790.txt.gz · Last modified: 2024/11/19 19:13 by rik