How is a public/private key pair generated from a Diffe-Hellman key exchange?
So is 2 the private key here ?


No, it's referred to as a "shared secret" (because it is shared between Alice and Bob, and is secret to everyone else).

If there were 'private' and 'public' keys (which is not the standard terminology with DH), then Alice's private key would be $a=6$, and the public key would be $g^a = 8$.  In this case, the 'private key' is private, in the sense that it allows her to perform the operation of deriving the shared secret; something that we hope is difficult if someone has only the public keys.