TLDR; How to customize the Linux bash prompt (and why you should)! If you’d like to add a bit more personalization to your Linux command line efforts, there’s a simple way to do so.
Linux is the most flexible operating system on the market. With many Linux distributions, the sky’s the limit to what you can customize. You can tweak the look and feel of your desktop — or change the desktop altogether — to make it a very personal and unique experience.
One change you might not know about is for the bash prompt. If you’re unfamiliar, the bash prompt is the prompt used for running commands. You open a terminal window and you’ll most likely see a prompt that looks like this:
jack@HIVE:~$
That’s what my default prompt is on my Ubuntu Budgie desktop. Essentially that prompt tells me the following:
jack – my username
HIVE – the hostname of my machine
~ – the current working directory (in this case, ~ equals home)
You may or may not need all of that information. For instance, when you include the current working directory in the prompt, you can wind up with a prompt so long that your commands have to wrap around in the terminal window. To me, that can get rather annoying, especially when you can simply run the pwd command (which prints out your current working directory).
