Page 1 of 1

Configuration file for Bash shell environment

Posted: 2024 Jun 22, 19:01
by Mihai
  • Custom Prompt (GLOBAL for all users):
The following configuration will apply to all users in the system.
If you have personalized Prompt for every user individually, the following configuration will override it.

Create and edit file custom_prompt.sh

Code: Select all

vim /etc/profile.d/custom_prompt.sh
Add the following code in the file and save:

Code: Select all

#!/bin/sh
export PROMPT_COMMAND='export PS1="[\t] \[\e[01;33m\][\v] \[\e[01;36m\][\u]\e[m@\[\e[01;31m\][\H] \[\e[01;32m\][\w]\[\e[01;33m\] \n  => $\[\e[00m\]  "'
Feel free to modify the PS1 content as you wish.