  Minimal linear codes have interesting applications in secret sharing schemes
and secure two-party computation. This paper uses characteristic functions of
some subsets of $\mathbb{F}_q$ to construct minimal linear codes. By properties
of characteristic functions, we can obtain more minimal binary linear codes
from known minimal binary linear codes, which generalizes results of Ding et
al. [IEEE Trans. Inf. Theory, vol. 64, no. 10, pp. 6536-6545, 2018]. By
characteristic functions corresponding to some subspaces of $\mathbb{F}_q$, we
obtain many minimal linear codes, which generalizes results of [IEEE Trans.
Inf. Theory, vol. 64, no. 10, pp. 6536-6545, 2018] and [IEEE Trans. Inf.
Theory, vol. 65, no. 11, pp. 7067-7078, 2019]. Finally, we use characteristic
functions to present a characterization of minimal linear codes from the
defining set method and present a class of minimal linear codes.
