The investigation of the structure of hard rods in nano space has been the subject of many theoretical studies due to their importance for understanding the behavior of liner polymers. Therefore in this thesis, we investigated the equilibrium and non equilibrium structure of hard rods inside of the one dimensional box. In this thesis the density functional theory (DFT) has been employed to investigate the equilibrium structure, whereas the time evolution of the density for non-equilibrium hard rods has been studied with time dependent density functional theory (DDFT). we have also investigated the effect of different wall potentials on the structure of the confined hard rods. The results obtained from this study show that the density profile of the hard rods in the one dimensional box exhibits an oscillatory behavior whose number of peaks is affected by number of molecules, box length and wall potential. By increasing the box length and decreasing the number of molecules in the box, the inhomogeneousity of the density profile is decreases. In fact distribution of molecules in the box may be interpretated by the entropy and energy effects. The role of these two effects on distribution of molecules in the box strongly depends on type of the wall potentials. The results of time evolution for density profile show that, when the rudiment input of the molecules distribution, in iterative method, is not far from equilibrium state, equilibrium density profile can be easily achieved even byconsidering a constant value for diffusion coefficient. But when the rudiment input of the molecules distribution in iterative method is far from equilibrium state, to determine the equilibrium density profile, diffusion coefficient should be considered a time dependent function.