On a camera with interchangeable lenses, focus on a star
Use the wide end of your zoom or your widest lens. Open the aperture to its lowest f-number and switch to manual focus. Magnify a bright star in live view, or take a test shot and enlarge it on playback. Turn the focus ring until the star is a small point. Start with 10 seconds and shorten the next shot if sharp stars leave trails.
AboutWide-angle lens