Under the Kolmogorov--Smirnov metric, an upper bound on the rate of convergence to the Gaussian distribution is obtained for linear statistics of the matrix ensembles in the case of the Gaussian, Laguerre, and Jacobi weights. The main lemma gives an estimate for the characteristic functions of the linear statistics; this estimate is uniform over the growing interval. The proof of the lemma relies on the Riemann--Hilbert approach.