

The electric flux Φ = ∫ E.dS
and according to the gauss theorem Φ = q / εo
Here, q is charge enclosed by gaussian surface, dS is area of gaussian surface, E is electric field.
So, for every derivation based on gauss theorem, you have to just equate the ∫ E.dS and q / εo
So, calculate the ∫ E.dS and net charge in surface and then put ∫ E.dS = q / εo
