Let Fq be the finite field with q = p m elements, where p is an odd prime and m is a positive integer. Let Trm denote the trace function from Fq onto Fp, and the defining set D ⊂ F t q , where t is a positive integer. In this paper, the set D = {(x 1 , x 2 , · · · , xt) ∈ F t q : Trm(x 2 1 + x 2 2 + · · · + x 2 t ) = 0, Trm(x 1 + x 2 + · · · + xt) = 1}. Define the p-ary linear code C D by C D = {c(a 1 , a 2 , · · · , at) : (a 1 , a 2 , · · · , at) ∈ F t q }, where c(a 1 , a 2 , · · · , at) = (Trm(a 1 x 1 + a 1 x 2 · · · + atxt)) (x 1 ,··· ,x t )∈D .We evaluate the complete weight enumerator of the linear codes C D , and present its weight distributions. Some examples are given to illustrate the results.2010 Mathematics Subject Classification: Primary: 94B05; Secondary: 11T71.