  We demonstrate a general gauging procedure of a pure matter theory on a
lattice with a global symmetry, a subsystem symmetry, or a semidirect product
of them. By applying the general gauging procedure to a semidirect product of
subsystem and global symmetries, we obtain the non-Abelian fracton order. We
demonstrate this gauging procedure on a cubic lattice in three dimensions with
two symmetries, $(\mathbb{Z}_2^{\rm sub} \times \mathbb{Z}_2^{\rm sub}) \rtimes
\mathbb{Z}_2^{\rm glo}$ and $\mathbb{Z}_3^{\rm sub} \rtimes \mathbb{Z}_2^{\rm
glo}$. The former case reproduces the non-Abelian fracton by gauging the
bilayer X-Cube code, and the latter case is a new non-Abelian fracton order. We
further identify the electric charges (including the non-Abelian fractons) with
the irreducible representations of the symmetry. The corresponding magnetic
fluxes can be obtained from the conjugacy classes of the symmetry.
