Restoring terminal default prompt

I'm not sure what the right terminology is. I have OS X v10.11.3.

I get the following prompt on the terminal window.

User uploaded file

I want to reset it back to the default with computer name, username, etc.

I changed something some time ago but now I cannot remember what I did.


I'll appreciate any help.

MacBook Pro with Retina display, OS X El Capitan (10.11.3), null

Posted on Mar 25, 2016 7:46 PM

Reply
6 replies

Mar 26, 2016 7:58 PM in response to gsaia

gsaia wrote:


OK... I fixed it. For some reason I renamed the profile file to profile.old sometime ago. I must have been following some directions to do something.

I restored the profile file and now I get the right prompt.

Thanks.

You renamed .profile to profile.old for some reason. So you should "Review" the contents of your .profile to make sure there is not something that is going to cause other problems.


by default a new account does NOT have a shell initialization file. The 'bash' shell will look for

.bash_profile

.bash_login

.profile

in that order, and it will stop looking if it finds one and executes it. But like I said, none of these exist when you initially get your Mac unless you create one, or something you installed creates one. And something you installed is generally not a typical GUI app, but more likely an open source package that is intended to run on the terminal or an X11 based window.

If are not sure what you are looking at in the .profile, you can post it here in a reply and someone will try to tell you want it is doing, and if you want to keep everything in it. Or at least ask semi-intelligent questions about what is in it.

Mar 26, 2016 12:51 AM in response to gsaia

You can reset only your PS1 prompt in the current Terminal session with:

$ source /etc/bashrc

Use the PS1 line parameters from the above file in your own ~/.bashrc, or ~/.bash_profile files for PS1 permanence.

export PS1='\[\h:\W \u \$ '


The following terminal prompt appears where the local Mac hostname is mycomputer, base name of the working directory, and user is scrat:

mycomputer: ~ scrat $ echo $PS1


Additional Reference.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Restoring terminal default prompt

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.