Barstow is a city in San Bernardino County, California, United States. The population was 22,639 at the 2010 census. Barstow is located 55 miles north of San Bernardino. Barstow is a major transportation center for the Inland Empire. Several major highways including Interstate 15, Interstate 40, and CA Highway 58 converge in the city. It is the site of a large rail classification yard, belonging to the BNSF Railway. The Union Pacific Railroad also runs through town using trackage rights on BNSF's main line to Daggett 10 miles east, from where it heads to Salt Lake City and the BNSF heads to Chicago. Barstow is about 62 miles to Baker, California and 111 miles to Primm, Nevada. Barstow is almost exactly midway between Los Angeles, California 130 miles southwest and Las Vegas, Nevada 125 miles northeast. Barstow is home to Marine Corps Logistics Base Barstow and is the closest city to the Fort Irwin Military Reservation.