Huffman (2013) [12]studied Fq-linear codes over Fqmand he proved the MacWilliams identity for these codes with re-spect to ordinary and Hermitian trace inner products. Let Sbe a finite commutative Fq-algebra. An Fq-linear code over Sof length nis an Fq-submodule of Sn. In this paper, we study Fq-linear codes over S.