We propose a randomized trial to determine the safety and effectiveness of aerobic exercise for patients who have primary pulmonary hypertension (PH) or PH secondary to interstitial lung disease (ILD). This project will be the first in a series of studies aimed at establishing exercise prescription and general rehabilitation guidelines for patients who have advanced lung diseases.