The United States Constitution names the president of the United States the commander-in-chief of the United States Armed Forces. Many presidents, however, also served in the military before taking office; all but 13 of the 45 persons to become president have served.