You can get a Swiss passport after 10 years of living and working there. You also have to live in the same city for at last 3 years and pass an exam with local authorities.
The questions on the exam can be about anything, from geography to personal relationships with your neighbors. Local authorities also talk to every neighbor to find out more about your character. And if you don’t have the best relationships with them, you’ll likely have to pass this exam again a year later. When a person gets a Swiss passport, the city where the new citizen lives will be stated as the place of birth.