2. Let $A(1,-1,0), B(2,0,1)$ be points on the skew lines $a, b$, respectively, and the direction vectors of lines $a, b$ are $\boldsymbol{a}=(1,0,-1), \boldsymbol{b}=(1,-1,1)$, then the distance between the two skew lines $a, b$ is $\qquad$ .
2. Solution: Let $\boldsymbol{n}=(x, y, z)$ be the common perpendicular vector, then $\boldsymbol{n} \cdot \boldsymbol{a}=$ $x-z=0, \boldsymbol{n} \cdot \boldsymbol{b}=x-y+z=0$, solving these gives $\boldsymbol{n}=(1,2,1)$,
$\overrightarrow{A B}=(1,1,1)$ the projection length of $\overrightarrow{A B}$ on $\boldsymbol{n}$ is $d=\frac{|\overrightarrow{A B} \cdot \boldsymbol{n}|}{|\boldsymbol{n}|}$ $=\frac{4}{\sqrt{6}}=\frac{2}{3} \sqrt{6}$, which is the desired result.