A magnitude 4.1 earthquake shook parts of Lake and Sonoma counties on Monday, the U.S. Geological Survey said.