Showing Bash instead of Root User Shell On CentOS / Redhat 8

This issue will occur when you deleted the bash history profile of root users that are hidden and try to switch to root bash but not able to login. In this case, the root profile not found.

Showing Bash instead of Root User Shell On CentOS / Redhat 8:

This happens when you incidentally deleted the hidden files which are shown below.

Check Out: How To Disable Signup Option On Frontend Gitlab Server

.bash_history .bash_logout .bash_profile .bashrc

I logged in as user “Pankaj” in the Linux machine.

showing bash instead of

Now I will remove those hidden files using rm -rf and I deleted them now I will log in again with the user then switch to root.

Check Out: How To Show Hidden File Extension In Windows 7

As you can see there’s a bash shell instead of the root user.

root login at bash

Because files are not present here for the root user. To solve, this issue copies those files from another Linux server and paste here as hidden files.

Check Out: Check Logs of Container Running In Docker On CentOS 7

switch to root bash

Now again switch to the user Pankaj to make sure it’s working fine.

See you can see now root user instead of bash.

That’s it  root profile history not found delete  history root switch to root bash root login at bash

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

1 thought on “Showing Bash instead of Root User Shell On CentOS / Redhat 8”

Leave a comment