Bhagavad Gita, Chapter 17, Verse 4

यजन्ते सात्त्विका देवान्यक्षरक्षांसि राजसाः । प्रेतान्भूतगणांश्चान्ये यजन्ते तामसा जनाः

yajante sāttvikā devānyakṣarakṣāṃsi rājasāḥ | pretānbhūtagaṇāṃścānye yajante tāmasā janāḥ

Translation

Sāttvic men worship the Gods; Rājasic, the Yakṣas and the Rākṣasas; the others — Tāmasic men — the Pretas and the hosts of Bhūtas.

— Alladi Mahadeva Sastri

Word meanings

yajante
worship
sāttvikāḥ
the sāttvic
devān
the Gods
yakṣarakṣāṃsi
Yakshas, and, Rākshasas, and
rājasāḥ
the rājasic
pretān
ghosts
bhūtagaṇān
of elementals, the hosts
ca
and
anye
others
yajante
worship
tāmasāḥ
tāmasic
janāḥ
people

Śaṅkarācārya's commentary

Gods: such as the Vasus. Yakṣas: such as Kubera. Rākṣasas: such as Nairṛta. Pretas: those who, while they had been on earth as brāhmaṇas, etc., neglected their proper duties, and who, after death, attained Vāyu-dehas (aerial bodies). All these beings, when worshipped, answer the prayers of the devotees by granting their respective desires.