Yamas

The  (यम), and their complement, the niyamas, represent a series of "right living" or ethical rules within Yoga philosophy. The word means "reining in" or "control". They are restraints for proper conduct given in the Vedas and the Yoga Sutras as moral imperatives, commandments, rules or goals. The are a "don't"s list of self-restraints, typically representing commitments that affect one's relations with others and self. The complementary represent the "do"s. Together and  are personal obligations to live well.

The earliest mention of is in the Rigveda. More than fifty texts of Hinduism, from its various traditions, discuss. Patañjali lists five in his Yoga Sūtras. Ten yamas are codified as "the restraints" in numerous Hindu texts, including Yajnavalkya Smriti in verse 3.313, the Śāṇḍilya and Vārāha Upanishads, the Hatha Yoga Pradipika by Svātmārāma, and the Tirumantiram of Tirumular.

The apply broadly and include self-restraints in one's actions, words, and thoughts.

Etymology and meaning
The earliest mention of is found in the Hindu scripture Rigveda, such as in verse 5.61.2, and later in the Jain Agamas. The word in the Rigveda means a "rein, curb", the act of checking or curbing, restraining such as by a charioteer or a driver. The term evolves into a moral restraint and ethical duty in the Jain Agamas. The were explained in detail by Patañjali in the Yoga Sūtras of Patanjali as the first step of the eight-fold path of yogic philosophy and practice for attaining enlightenment and union of the mind, body and soul.

means "restraint", particularly "from actions, words, or thoughts that may cause harm".

Yamas by source
The number of Yamas varies with the source:

At least sixty ancient and medieval era Indian texts are known that discuss. Most are in Sanskrit, but some are in regional Indian languages. Of the sixty, the lists in eleven of these texts are similar, but not the same, as that of Patanjali's. Other texts list between one and ten ; however, ten is the most common.

The order of listed, the names and nature of each , as well as the relative emphasis vary between the texts. Some texts use the reverse of in other texts, as ; for example,  (dispassion from hedonism, somewhat reverse of the  ) is described in verse 33 of Trishikhi Brahmana Upanishad in its list of. Many texts substitute one or more different concepts in their list of. For example, in the ten listed by Yatidharma Sangraha,  (non-anger) is included as a. Ahirbudhnya Samhita in verse 31.19 and Darshana Upanishad in verses 1.14-15 include as a, and explain it as the ethical restraint of not jumping to conclusions, being compassionate to every being, and considering suffering of others as one's own. In verse 31.21, Ahirbudhnya Samhita includes as the virtue of forgiveness and restraint from continued agitation from wrong others have done. Mahakala Samhita in verses II.11.723 through II.11.738 lists many of the ten above, but explains why it is a virtue in a different way. For example, the text explains is an ethical precept and the restraint from too much and too little emotions. It suggests reflects one's inner state, is the expression of kindness towards kin, friend, stranger, and even a hostile person, and that one must remain good and kind no matter what the circumstances. This view of is shared in Shandilya Upanishad and Jabala Darshana Upanishad. Atri Samhita in verse 48, lists (आनृशंस्य) as the restraint from cruelty to any living being by one's actions, words or in thoughts. Shivayoga Dipika in verse 2.9 substitutes for, defining  as "sweet and true speech".