A good way to learn the notes on the fretboard is to practice naming them out loud while visualizing the position of each note on the fretboard. Try playing the low E string (6th string) followed by the notes at the first four frets on the same string, first ascending, then descending. Watch your left hand and say the note names out loud as you play them. Call the non natural notes sharps when ascending and flats when descending.
When you can do this easily without mistakes, repeat the process with your eyes closed. Once you’ve mastered this on the 6th string, move to the 5th string and do the same. Next do the 4th string, then the 3rd, etc until you’ve covered every string.
The next step is to find the same note in higher and lower octaves. For example, try finding all the F# notes in the first position (there are three). Then pick another note, then another, etc. Do this while watching your left hand to begin with, then find all the notes with your eyes closed. Once you get good at this, you will find reading music a lot easier.
Here are two octaves of the E chromatic scale. Notice that sharps are used when the scale ascends and flats are used as it descends. This is common practice when writing chromatic passages in music.
This exercise will improve your knowledge of flats. Once again, write the name of each note on a piece of paper.