The linear instability of the electron temperature gradient (ETG) driven modes in the presence of zonal flows is investigated. Random and deterministic cos-like profiles of the zonal flow are considered. It is shown that the presence of shearing by zonal flows reduces the instability growth rates. The sufficiently strong random shearing can fully stabilize the linear instability of ETG drift modes.