In this chapter, we study the mechanics of nanostructures such as graphene sheets and carbon nanotubes under unidirectional compression and tension. The nanostructures are influenced by temperature effects and vacancy defects and their mechanical behavior is predicted using molecular dynamics (MD). The numerical MD models are validated by comparison with analytical models derived from continuum theory. A straight forward modeling approach is discussed to prescribe boundary conditions on the atoms and to extract reaction forces. This approach allows us to investigate various different loading cases as well as the effects of temperature and defects on the mechanical stability of nanostructures. Two case studies are presented in this chapter. Study (1) discusses the effects of vacancy defect position and temperature on the carbon nanotube (CNT) critical buckling load. The study considers (multiwall) CNTs of various diameters, lengths, and wall thicknesses. Study (2) focuses on the stability of uniaxial compressed graphene sheets with and without defects and hydrogen termination. In addition, the adhesive stability of graphene sheets on different substrates is investigated to study different graphene to substrate transfer routes.