CMIMC 2020 Power Problem 2.4

Prove that for any q-ary linear code \mathcal{C}, the following relation holds.

d(\mathcal{C})=\min _{c \in \mathcal{C}, c \neq 0} \mathrm{wt}(c)