My Terminal is playing up, any experts?

Discussion in 'Mac Basics and Help' started by Brucy666, Nov 25, 2008.

  1. Brucy666 macrumors newbie

    Joined:
    Nov 25, 2008
    #1
    Ok, so heres the problem, when i start up Terminal and open a new window, the initial writing is..

    Last login: Tue Nov 25 21:37:14 on ttys000
    Unknown-**-**-**-**-**-**:~ Username$
    * = random number or letter

    After asking around a bit i found out that it should not say this, instead it should be
    Welcome/Username$ (or something along that line)

    This disables me from using certain commands such as
    cd /Users/Username/Desktop/'filename'

    Can anyone help me in my hour of need

    Thankyou

    Brucy
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Never seen it before, but I'd suggest a reboot first to see if the problem is persistent.
     
  3. Brucy666 thread starter macrumors newbie

    Joined:
    Nov 25, 2008
    #3
    Yea i tried that... didn't work

    although i found the same pattern of numbers in file sharing when i turn it on... so i turned it off and the problem is still there
     
  4. JG271 macrumors 6502a

    JG271

    Joined:
    Dec 17, 2007
    Location:
    UK
    #4
    Possibly try a verify disk permissions under disk utility. Other than that, i can't think what to suggest, seems pretty odd! You're not booting up in single user mode or anything like that?
     
  5. ergdegdeg Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
    #5
    You can't cd to a file but only to a folder.
    Try changing your computer name under System Preferences --> Sharing --> Computer Name and Edit...
     
  6. Brucy666 thread starter macrumors newbie

    Joined:
    Nov 25, 2008
    #6
    already done that as well

    and i ment 'foldername' not file :p
     
  7. Brucy666 thread starter macrumors newbie

    Joined:
    Nov 25, 2008
  8. johto macrumors 6502

    johto

    Joined:
    Jan 15, 2008
    Location:
    Finland
    #8
    This is because your "hostname" is currently that random number and letter" combinatio. This is your ethernet MAC address i believe.

    Go to terminal and type command "hostname", does it print the same ?

    Chec you System preferences -> Sharing -> computer name Does it show th same name?

    It could be that your computer is getting its name dynamic when it gets it's IP with DHCP. You could try edit the /etc/hostconfig file(you need admin permissions) and add a last line telling your static computer name.

    Here is example of my /etc/hostconfig. I added that last line:

    #################
    # This file is going away

    AFPSERVER=-NO-
    AUTHSERVER=-NO-
    AUTOMOUNT=-YES-
    NFSLOCKS=-AUTOMATIC-
    NISDOMAIN=-NO-
    TIMESYNC=-YES-
    QTSSERVER=-NO-
    WEBSERVER=-NO-
    SMBSERVER=-NO-
    SNMPSERVER=-NO-
    HOSTNAME="imac"

    ###############
    This gives my mac a static hostname "imac" and it shows nicely on the therminal :)
     
  9. Brucy666 thread starter macrumors newbie

    Joined:
    Nov 25, 2008
    #9
    ok, i think that is on the right track, but when i type /etc/hostconfig into terminal, it says

    '-bash: /etc/hostconfig: Permission denied'

    but i am admin on my computer...

    how do u check the admin status?
     
  10. Neil321 macrumors 68040

    Neil321

    Joined:
    Nov 6, 2007
    Location:
    Britain, Avatar Created By Bartelby
    #10
    System prefs > Accounts ?
     
  11. John Jacob macrumors 6502a

    John Jacob

    Joined:
    Feb 11, 2003
    Location:
    Columbia, MD
    #11
    It is not an executable file. To see the contents of the file, type cat /etc/hostconfig. To edit it, type sudo vi /etc/hostconfig and replace vi with your editor of choice.
     

Share This Page