Because there are so many different strains, it’s hard to say how long immunity to the flu lasts after getting sick. On the other hand, if you get the flu shot, you’re protected against multiple variations of the virus for about six months.