The self-similarity hypothesis claims that in classical general relativity, spherically symmetric solutions may naturally evolve to a self-similar form in certain circumstances. In this context, the validity of the corresponding hypothesis in nonspherical geometry is very interesting as there may exist gravitational waves. We investigate self-similar vacuum solutions to the Einstein equation in the so-called whole-cylinder symmetry. We find that those solutions are reduced to part of the Minkowski spacetime with a regular or conically singular axis and with trivial or nontrivial topology if the homothetic vector is orthogonal to the cylinders of symmetry. These solutions are analogous to the Milne universe, but only in the direction parallel to the axis. Using these solutions, we discuss the nonuniqueness (and nonvanishing nature) of C energy and the existence of a cylindrical trapping horizon in Minkowski spacetime. Then, as we generalize the analysis, we find a two-parameter family of self-similar vacuum solutions, where the homothetic vector is not orthogonal to the cylinders in general. The family includes the Minkowski, the Kasner, and the cylindrical Milne solutions. The obtained solutions describe the interior to the exploding (imploding) shell of gravitational waves or the collapse (explosion) of gravitational waves involving singularities from nonsingular initial data in general. Since recent numerical simulations strongly suggest that one of these solutions may describe the asymptotic behavior of gravitational waves from the collapse of a dust cylinder, this means that the self-similarity hypothesis is naturally generalized to cylindrical symmetry.