Cheap VPS Hosting Promos
VPS Coupon Codes, Reviews, Tutorials

How to Solve [-bash-4.2#] Error in SSH Terminal Prompt

The problem

Usually, the SSH terminal prompt should start with [name@host ~] $, but I got an error when I login with my SSH and it start with bash-4.2$.

How to solve

Every account is using bash, but it is configured to show your username, hostname, and path in the shell prompt. Shells are very configurable. So if you saw the bash-4.2$ instead of your username, there should been 2 files missed under /root:

.bash_profile
.bashrc

Just copy these 2 files back to /root:

cp /etc/skel/.bashrc /root/
cp /etc/skel/.bash_profile /root/

and the problem should be solved!

Comments Be the first

  • Nickname
  • Email
  • Website

GET BEST CHEAP VPS DEALS HERE!

Counpon CodesReviews