Metaheuristic algorithm is used to solve the weight minimization problem of truss structures considering shape, and sizing design variables. The cross-sectional areas of the line element in trusses are the design variables for size optimization and the changeable joint coordinates are the shape optimization used in this study. The design of plane and spatial truss structures are optimized by metaheuristic technique named Teaching-Learning-Based Optimization (TLBO). Finite element analyses of structures and optimization process are carried out by the computer program visually developed by the authors coded in MATLAB. The four benchmark problems (trusses 2D ten-bar, 3D thirty-seven-bar, 3D seventy-two-bar and 2D two-hundred-bar) taken from literature are optimized and the optimal solution compared the results given by previous studies.