The coronal loops confine a low density (n=10¹⁰ cm⁻³) and hot plasma (T=10⁶ K), whose ends interact with the much denser and hotter photospheric fluid. The linear stability of the dynamical and thermal equilibria of the coronal plasma is analyzed. A formalism based on methods of irreversible thermodynamics was used, which systematically builds up (whenever it is possible) a variational principle for studying the stability. The stability conditions derived in this work are compared with results available in the literature, which were obtained by standard stability methods.