Step 1: Identify the goal.
We want the self-inductance $L$ of a long solenoid of length $l$, radius $r$, with $n$ turns per unit length, in free space.
Step 2: Field inside a long solenoid.
The magnetic field inside is nearly uniform, $B = \mu_0 n I$, where $I$ is the current.
Step 3: Total number of turns.
If there are $n$ turns per unit length over a length $l$, the total turns are $N = n l$.
Step 4: Flux linkage.
Each turn encloses area $A = \pi r^2$, so the flux through one turn is $\Phi = B A = \mu_0 n I \pi r^2$. The total linkage is $N\Phi = (n l)(\mu_0 n I \pi r^2)$.
Step 5: Use the definition of inductance.
Inductance is defined through $N\Phi = L I$, so divide the flux linkage by $I$.
\[ L = \frac{N\Phi}{I} = \mu_0 n^2 \pi r^2 l \]
Step 6: State the result.
This matches the standard form $L = \mu_0 \pi n^2 r^2 l$.
\[ \boxed{\mu_0 \pi n^2 r^2 l} \]