Learning the notes on the fretboard sounds huge: six strings, 24 frets, 144 spots. But there are only 12 different notes, and they repeat. Learn a handful of rules and two strings, and you can find any note anywhere. Here is the method, step by step, with diagrams for each part.
Western music uses 7 letters, A B C D E F G, then starts over. Between most letters there is a sharp/flat note (A♯ is the same as B♭). The two exceptions: there is nothing between B and C, or between E and F. That gives 12 notes: A, A♯, B, C, C♯, D, D♯, E, F, F♯, G, G♯. One fret = one step along that list.
These two strings are where most chord and scale shapes start, so they pay off first. The open strings are E and A; from there count up the alphabet. Learn the natural notes (gold) first, and the sharps (dark) follow automatically.

Landmarks: fret 5 on the low E is A, fret 7 is B, fret 12 is E again. On the A string, fret 3 is C, fret 5 is D, fret 7 is E.
Every note from the open strings to fret 12, color-coded, with a blank neck to fill in from memory.
Download the free chart All 26 free charts →Once you know a note on the E or A string, octave shapes find it on the other strings. Two frets over and two strings up is the same note an octave higher (for example, G at the 3rd fret of the low E is also G at the 5th fret of the D string). On the G and B strings the shape stretches one extra fret, because the B string is tuned differently. Here is every G on the neck:

The 12th fret is the octave of the open string, so everything above it repeats the pattern from the open strings. Here are all the natural notes from the nut to the 12th fret; the C notes are red as reference points.

There are only 12 different notes. They repeat every 12 frets and appear on several strings, which is why a few rules let you find any of them.
Learn the natural notes on the low E and A strings first, then use octave shapes to find the same notes on the other strings. Practice one note a day across the whole neck.
Those pairs are only a half step apart, so there is no note between them. On guitar that means B to C and E to F are one fret apart.
Not by rote. Knowing the E and A strings plus octave shapes lets you work out any note in a second or two, and that becomes instant with practice.
More guides: pentatonic boxes guide · connecting the 5 boxes · breaking out of the box · mixing major and minor pentatonic · left-handed scale charts · guitar modes explained.