The United States Constitution names the President of the United States the commander in chief of the U.S armed forces. However, previous service in the military is not a pre-requisite for the position of president. The following list outlines the military service (or lack) of each president before becoming the commander in chief.
George W. Bush: served as a pilot in the Texas National Guard.
Ronald Reagan: served as a second lieutenant in the Army Reserve; served in the United States Army during World War II, attaining the rank of major. He was barred from combat because of poor eyesight. He narrated pre-flight training films under the Army Air Force Motion Picture Unit.
Harry S. Truman: served in the Missouri National Guard (1905-1911; 1917); served with the 129th Field Artillery (1917-1919), attaining the rank of major.
Grover Cleveland: none. He was drafted during the American Civil War, but paid $150 for a substitute (a legal option under the terms of the Conscription Act of 1863).
Chester A. Arthur: served in the New York State militia (1858-1862) and fought in the American Civil War, attaining the rank as quartermaster general.