The self inductance is defined on the magnetic flux linked with the coil when unit current flows through it.
Or
The self inductance is defined as the emf induced in the coil,...
Magnetic field inside the solenoid
B =μ0nI
n → number of turns per unit length, I → current flowing,
ϕ' = Magnetic field through each turn = BA = μ0nIA
Total magnetic flux linked...