In Terminal, where it displays XXX@YYY , what is XXX and what is YYY? I transferred a backup to a new mac.  However the names got changed, and one has a -2 added to it. Now my terminal reads name@name-2 -$.   In Finder it appears like so: 

`name (2)`
  `HardDriveName`
    `Users`
       `name`


Trying to identify what name (2) is and how I can change it if possible.   Was never prompted in the migration and not sure why the -2 is appended in the terminal now.
name (2) is your computer's hostname. You can change it in the 'Sharing' section of System Preferences: