Configuration file for Bash shell environment

Locked
User avatar
Mihai Romania
Posts: 60
Joined: 2023 May 03, 14:12
Location: ROMANIA
Contact:

Configuration file for Bash shell environment

Post 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.
I'm on LinkedIn
Locked