In data storage systems, authentication codes, association schemes, and some other fields, linear codes with few weights play an important role.In this paper, we construct four classes of few weights linear codes over $\mathbb F_{q}$ and use Gauss periods in the semi-primitive case to determine their weight distributions.There are some linear codes with two weights whose duals are almost Maximum Distance Separable (AMDS) codes and a class of Maximum Distance Separable (MDS) codes.