Issue
On login Oracle Linux 7.5 user shows -bash-4.2 instead of username like [root@localhost ~]
SolutionUse this command in your terminal to fix this issue:
export PS1='[\u@\h \W]\$ '
If you want to show this prompt show after you reboot, you can try this (with su):
echo "export PS1='[\u@\h \W]\$ '" > /etc/profile.d/bash_prompt.sh
Environment
+ Oracle Linux 7.5