In this paper we study a class of solutions of the Boltzmann equation which have the−1 with the matrix A describing a shear flow or a dilatation or a combination of both. These solutions are known as homoenergetic solutions. We prove existence of homoenergetic solutions for a large class of initial data. For different choices for the matrix A and for different homogeneities of the collision kernel, we characterize the long time asymptotics of the velocity distribution for the corresponding homoenergetic solutions. For a large class of choices of A we then prove rigorously the existence of self-similar solutions of the Boltzmann equation. The latter are non Maxwellian distributions and describe far-from-equilibrium flows. For Maxwell molecules we obtain exact formulas for the H-function for some of these flows. These formulas show that in some cases, despite being very far from equilibrium, the relationship between density, temperature and entropy is exactly the same as in the equilibrium case. We make conjectures about the asymptotics of homoenergetic solutions that do not have self-similar profiles.