West Point, and from 1841 to 1844 was employed on the fortifications in New York Harbor.
In 1845 he visited the military establishments of Europe.
In the winter of 1845-46 he delivered at the Lowell Institute, Boston, a series of lectures on the science of war, afterwards published in book form with the title of Elements of military art and Science.
He served in California and on the Pacific coast during the war with Mexico, in which he distinguished himself.
He was on the staff of Commodore Shubrick at the capture of Mazatlan, and was made lieutenant-governor.
From Aug. 13, 1847, to Dec. 20, 1849, he was secretary of the province and Territory of California, and had a large share in preparing the State constitution.
He left the army in 1854, and began the practice of law in San Francisco.
In August, 1861, he was appointed a major-general of the regular army, and succeeded Fremont in command of the Western Department in November.
In 1862 he took command of the army before Corin