Entropy generation and heat transfer caused by the natural convection in a square cavity, which is linearly heated from one of the vertical walls and uniformly cooled from the other vertical wall, is studied numerically. The upper and lower horizontal walls are insulated perfectly. According to the five different locations of the center of linear heating (0, 0.25, 0.5, 0.75, and 1) is carried out for Rayleigh numbers between 10(3) and 10(6). Discrete equations are solved by the Boussinesq approach, according to the SIMPLE algorithm. The numerical results are demonstrated as streamline, isotherm, heatline, Bejan number, and entropy generation (heat transfer induced, fluid friction-induced and total) contours, local and average values of Nusselt number, Bejan number, and entropy generation as a function of the center of the linear heating position and Rayleigh number. As a result of the study, it is observed that the position of the center of linear heating has a significant effect on entropy generation and heat transfer caused by the natural convection. It is shown that as the center of linear heating shifted upwards, the fluid flow moved to the right, and its intensity decreased, but the heat transfer increased substantially.