When playing standard forms of chords like E, A, C, D, G, these chords are recognised by their finger shape formations rather than the note they are rooted on, but bar chords and power chords are the same shapes shifted up the neck to raise the notes.
Because of the way that these work, once you know that the 4th fret of the bottom E is G-sharp you can zip straight to it and shape your bar or power over it achieving a G-sharp without a second thought.
As for knowing the 6 strings natural notes, from fat to thin: E-A-D-G-B-E
Eat All Dead Gerbils Before Evening meal

