One of the tricky things about learning guitar is the notes are harder to visualize than say a piano keyboard. Whether you are beginner or advanced, you will need to memorize the notes cold up and down the entire fretboard.
Here is an example where I wrote out the first few notes on the neck, not including sharps and flats.
The best approach is to start from any open sting and learn each fret one at a time all the way up the neck. The good news is you really only have to memorize up to the 12th fret and the notes repeat from there. For example starting from the open high E string, go up one fret at a time - E F F# G G# A Bb B C C# D D# E, and so on. Repeat this on each string. Over time you will simply memorize that the 3rd fret on the E string is G and the 5th fret is A, etc.
Here is an example of a "blank fretboard" so you can print it out and chart all the notes for yourself.
Next you can try different ways to challenge your knowledge of the fretboard.
1) Pick any note like F#, for example, and as quickly as you can, play an F# on every string.2) Pick a fret, for example the 10th fret, and know each note across every string.