How to change computer name so terminal displays it in Mac OS X Mountain Lion? When I setup my computer I named it "Scott's MacBook Pro". And so when I go to System preferences->Sharing, it says Scott's MacBook Pro there as my computer name. However, opening up a terminal gives me this prompt:

Last login: Sun Oct  7 11:02:49 on ttys003
new-host-4:~ scott$ 


When I login to Backblaze, they list my computer as "new‑host‑4_2012_10_07". Did I not fully set my computer name? Should I use the traditional hostname command?
If you use:
sudo scutil --set HostName name-you-want

it will work a bit better. From the scutil(8) man page:

--get pref
    Retrieves the specified preference.  The current value will be
    reported on standard output.

    Supported preferences include:
          ComputerName   The user-friendly name for the system.
          LocalHostName  The local (Bonjour) host name.
          HostName       The name associated with hostname(1) and gethostname(3).

--set pref [newval]
    Updates the specified preference with the new value.  If the new value is not
    specified on the command line then it will be read from standard input.

    Supported preferences include: ComputerName LocalHostName HostName

    The --set option requires super-user access.