Can you tell me how Sacramento became the capital of California?
user
Sure!  The exact location of state capitals is determined by state law.  California state law declares that Sacramento, and no other city, shall be the permanent state capital.  Sacramento was established as the center of colonial life in the Sacramento Valley starting in the middle of the 18th century, and it has been California's capital since 1850.  In addition, California's government had previously operated in San Francisco following the discovery of gold in the Sierra Nevada Mountains.
assistant
Can you tell me how Sacramento became the capital of California?
user
Sacramento was not the first capital of California.  In the early days of European settlement in the region, the Spanish city of Monterey served as the capital.  However, in the late 1830s, Monterey was captured by Mexicans, and US forces took over the city.  In this period, the governor, John Bigler, decided that Sacramento was the best location for the state capital, and he relocated there.  It went on to become the permanent capital of the state of California.
assistant
Can you tell me how Sacramento became the capital of California?