Show username on mac terminal prompt
Assuming your shell is bash edit the /etc/bashrc file changing PS1='\W\$ ' to:

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

You'll need to use sudo, e.g., sudo nano /etc/bashrc

On OS X 10.11 you might also need to disable SIP in order to make the edit.

Otherwise setting it in your ̃/.bash_profile or ~/.profile file, either of which, you'd not have to use sudo or disable SIP to edit.

Explanation:

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

PS1 The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string.
=   equals
'   single quote
\h  the hostname up to the first ‘.’
:   colon
\W  the basename of the current working directory, with $HOME abbreviated with a tilde
    white space
\u  the username of the current user
\$  if the effective UID is 0, a #, otherwise a $
    white space
'   single quote

Examples:

MacBookPro:~ user$
MacBookPro:Documents user$
MacBookPro:~ root#


See the PROMPT_COMMAND and PROMPTING sections in the OS X Man Pages for BASH(1) for more information on the subject.