How to restore the computer's username in Terminal?
Simply enter

nano ~/.bash_profile


then go to the line

export PS1='$ '


and delete that line. Then save the file and exit nano. After then execute

. ~/.bash_profile


That will be load the settings from this file.