Let $R$ be an infinite commutative ring with identity and $n\geq 2$ be an integer. We prove that for each integer $i=0,1,\cdots ,n-2,$ the $L^{2}$-Betti number $b_{i}^{(2)}(G)=0,$ $\ $when $G=\mathrm{GL}_{n}(R)$ the general linear group, $\mathrm{SL}_{n}(R)$ the special linear group, $% E_{n}(R)$ the group generated by elementary matrices. When $R$ is an infinite principal ideal domain, similar results are obtained for $\mathrm{Sp}_{2n}(R)$ the symplectic group, $\mathrm{ESp}_{2n}(R)$ the elementary symplectic group, $\mathrm{O}(n,n)(R)$ the split orthogonal group or $\mathrm{EO}(n,n)(R)$ the elementary orthogonal group. Furthermore, we prove that $G$ is not acylindrically hyperbolic if $n\geq 4$. We also prove similar results for a class of noncommutative rings. The proofs are based on a notion of $n$-rigid rings.