The trick here is not only to avoid all obvious sources of carbohydrate (sweets, bread, spaghetti, rice, potatoes), but also to be careful with your protein intake. If you eat large amounts of meat, eggs and the like, the excess protein will be converted into glucose in your body. Large amounts of protein can also raise your insulin levels somewhat. This compromises optimal ketosis.
The word diet first appeared in English in the 13th century. Its original meaning was the same as in modern English, “habitually taken food and drink.” But diet was used in another sense too in the Middle and early modern English periods to mean “way of living.” This is, in fact, the original meaning of diet’s Greek ancestor diaita, which is derived from the verb diaitasthan, meaning “to lead one’s life.” In Greek, diaita, had already come to be used more specifically for a way of living prescribed by a physician, a diet, or other regimen.