2. Find the largest positive integer $n$, such that there exist 8 integers $x_{1}, x_{2}, x_{3}, x_{4}$ and $y_{1}, y_{2}, y_{3}, y_{4}$ satisfying:
$$
\{0,1, \cdots, n\} \subseteq\left\{\left|x_{i}-x_{j}\right| \mid 1 \leqslant i<j \leqslant 4\right\} \bigcup\left\{\left|y_{i}-y_{j}\right| \mid 1 \leqslant i<j \leqslant 4\right\} .
$$
Let $X=\left\{\left|x_{i}-x_{j}\right| \mid 1 \leqslant i<j \leqslant 4\right\}, Y=\left\{\left|y_{i}-y_{j}\right| \mid 1 \leqslant i<j \leqslant 4\right\}$. Since $0 \in X \cup Y$, without loss of generality, assume $0 \in X$, then there exists $x_{i}=x_{j}(1 \leqslant i<j \leqslant 4)$, thus $|X| \leqslant 1+C_{3}^{2}=4$, and $|Y| \leqslant C_{4}^{2}=6$, so $n+1 \leqslant 4+6=10 \Rightarrow n \leqslant 9$.
On the other hand, take $\left(x_{1}, x_{2}, x_{3}, x_{4}\right)=(0,0,7,8),\left(y_{1}, y_{2}, y_{3}, y_{4}\right)=(0,4,6,9)$, then $X=\{0,1,7,8\}, Y=\{2,3,5,4,6,9\} \Rightarrow X \cup Y=\{0,1,2, \cdots, 9\}$ satisfies the condition. In summary, the largest positive integer $n=9$.