3

just some time ago i installed the OS X Server app on my mac and since this day it always appears server as the chosen directory in my terminal.

But because i dont really like the Server application i just removed it but the server in my terminal is still left. So i wonder now how i can get the default back like users/...

I am running mountain lion on my mac.

I am a real newby to both mac and usage of terminal but i need it know for some work and i just get errors every time i am trying to enter something.

  • 1
    what does echo $HOME returns ? Or maybe you have something in you .profile or your .bashrc_profile that changes the Default Working Directory. – Matthieu Riegler May 14 '13 at 23:17
  • 3
    If the full prompt is like server:~ username$, you can change the hostname. If it's just server or something, check your ~/.bash_profile. – Lri May 15 '13 at 9:21
  • echo home returns /Users/username – Bohrnsen May 15 '13 at 10:19
  • What does running pwd show? – Mark May 15 '13 at 10:53
  • 1
    pwd returns the same /Users/username – Bohrnsen May 16 '13 at 22:25
7

Goto your HomeFolder -> Library -> Preferences and delete the file : com.apple.terminal.plist

That should reset the settings on your Terminal

  • I can not find the terminal.plist i.e. it does not exist in my preferences libary – Bohrnsen May 15 '13 at 10:22
  • 2
    From the Finder menu bar, select Go ▹ Go to Folder and copy the following line into the text box that opens: ~/Library/Preferences/com.apple.Terminal.plist – Jash Jacob May 15 '13 at 15:01
  • 1
    I removed it but it does not change anything. Tried to even reboot after removing and install+uninstall the server app but nothing changes. – Bohrnsen May 16 '13 at 22:27
  • 1
    The file is com.apple.Terminal.plist. – Nicolas Barbulesco Nov 30 '13 at 20:15
2

Since you have mentioned that running pwd shows a path not mentioning server, I believe you are mistaking server for being the directory when it is actually the hostname.

OS X Server will change your hostname (by default) to server.<name>.private, so Terminal will show server:~ username$ (in Bash with the default prompt).

To change the hostname, you can use the following command:

sudo scutil --set HostName yourhostname

Replace yourhostname with your preferred hostname

  • This is a way better solution, tried everything delete plist, ps1 but this did the trick. Thankyou!! – Ali Sajid Apr 9 at 8:19
0

System terminal:

defaults delete com.apple.Terminal

iTerm2:

defaults delete com.googlecode.iterm2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .