The Einstein-Brillouin-Keller (EBK) semiclassical quantization is used to deduce the quantum-mechanical magnetoelectronic structure of a cylindrical two-dimensional electron gas (2DEG). This approach allows for a detailed knowledge of the correspondence between the classical paths, the EBK single-electron energy, and the quantum states. A better understanding is also given by a comparison between the classical motion of electrons in a planar surface and the trajectories on the curved surface of the cylinder. In a channel patterned in a flat 2DEG, under a transverse magnetic field different kinds of orbits are allowed: (i) cyclotron orbits corresponding to flat Landau levels, (ii) edge states which collide with one channel wall, and (iii) traversing trajectories colliding with both channel walls. In a cylindrical 2DEG, different kinds of orbits are allowed, when a magnetic field acts orthogonally to the cylinder axis: (i) cyclotron orbits, (ii) edge states localized on the flanks of the tube, (iii) anomalous edge states weakly localized on the flanks with backward velocity, and (iv) traversing trajectories.