4. From the 12 edges and the 12 face diagonals of a cube, select $n$ lines such that any two of the selected line segments are skew lines. The maximum value of $n$ is $\qquad$ .
4. 4 .

In the cube $A B C D-A_{1} B_{1} C_{1} D_{1}$, take $A B_{1}, B C_{1}, C D_{1}, D A_{1}$. Clearly, they are pairwise skew, so $n \geqslant 4$. Furthermore, the required skew lines intersect the cube's surface at distinct points, and there can be at most 8 such points, so $n \leqslant 4$.