Mishneh Torah — Transmission of the Oral Law מסירת תורה שבעל פה, Chapter 21
The full Hebrew text of Mishneh Torah, Transmission of the Oral Law, Chapter 21, with English translation by Maimonides (Rambam).
נִמְצָא מֵרָב אַשֵׁי עַד מֹשֶׁה רַבֵּנוּ – אַרְבָּעִים אִישׁ, וְאֵלּוּ הֶן: (א) רָב אַשֵׁי, (ב) מֵרַבָּא, (ג) מֵרַבָּה, (ד) מֵרָב הוּנָא, (ה) מֵרִבִּי יוֹחָנָן וְרָב וּשְׁמוּאֵל, (ו) מֵרַבֵּנוּ הַקָּדוֹשׁ, (ז) מֵרַבַּן שִׁמְעוֹן אָבִיו, (ח) מֵרַבַּן גַּמְלִיאֵל אָבִיו, (ט) מֵרַבַּן שִׁמְעוֹן אָבִיו, (י) מֵרַבַּן גַּמְלִיאֵל הַזָּקֵן אָבִיו, (יא) מֵרַבַּן שִׁמְעוֹן אָבִיו, (יב) מֵהִלֵּל אָבִיו וְשַׁמַּאי, (יג) מִשְּׁמַעְיָה וְאַבְטַלְיוֹן, (יד) מִיְּהוּדָה וְשִׁמְעוֹן, (טו) מִיְּהוֹשׁוּעַ וְנִתַּאי, (טז) מִיּוֹסֵף וְיוֹסֵף, (יז) מֵאַנְטִיגְנוֹס, (יח) מִשִּׁמְעוֹן הַצַּדִּיק, (יט) מֵעֶזְרָא, (כ) מִבָּרוּךְ, (כא) מִיִּרְמְיָה, (כב) מִצְּפַנְיָה, (כג) מֵחֲבַקּוּק, (כד) מִנַּחוּם, (כה) מִיּוֹאֵל, (כו) מִמִּיכָה, (כז) מִיְּשַׁעְיָה, (כח) מֵעָמוֹס, (כט) מֵהוֹשֵׁעַ, (ל) מִזְּכַרְיָה, (לא) מִיְּהוֹיָדָע, (לב) מֵאֱלִישָׁע, (לג) מֵאֵלִיָּהוּ, (לד) מֵאֲחִיָּה, (לה) מִדָּוִיד, (לו) מִשְּׁמוּאֵל, (לז) מֵעֵלִי, (לח) מִפִּינְחָס, (לט) מִיְּהוֹשׁוּעַ, (מ) מִמֹּשֶׁה רַבֵּנוּ רִבָּן שֶׁלְּכָל הַנְּבִיאִים, מֵעִם ה' אֱלֹהֵי יִשְׂרָאֵל.
Thus, there were forty generations from Rav Ashi back to Moses, our teacher, of blessed memory. They were:1) Rav Ashi [received the tradition] from Ravva.2) Ravva [received the tradition] from Rabbah.3) Rabbah [received the tradition] from Rav Huna.4) Rav Huna [received the tradition] from Rabbi Yochanan, Rav, and Shemuel.5) Rabbi Yochanan, Rav, and Shemuel [received the tradition] from Rabbenu Hakadosh.6) Rabbenu Hakadosh [received the tradition] from Rabbi Shimon, his father.7) Rabbi Shimon [received the tradition] from Rabban Gamliel, his father.8) Rabban Gamliel [received the tradition] from Rabban Shimon, his father.9) Rabban Shimon [received the tradition] from Rabban Gamliel, the elder, his father.10) Rabban Gamliel, the elder, [received the tradition] from Rabban Shimon, his father.11) Rabban Shimon [received the Tradition] from Hillel, his father, and Shammai.12) Hillel and Shammai [received the tradition] from Shemayah and Avtalion.13) Shemayah and Avtalion [received the tradition] from Yehudah and Shimon [ben Shatach].14) Yehudah and Shimon [received the tradition] from Yehoshua ben Perachiah and Nittai of Arbel.15) Yehoshua and Nittai [received the tradition] from Yosse ben Yo'ezer and Yosef ben Yochanan.16) Yosse ben Yo'ezer and Yosef ben Yochanan [received the tradition] from Antignos.17) Antignos [received the tradition] from Shimon the Just.18) Shimon the Just [received the tradition] from Ezra.19) Ezra [received the tradition] from Baruch.20) Baruch [received the tradition] from Jeremiah.21) Jeremiah [received the tradition] from Tzefaniah.22) Tzefaniah [received the tradition] from Chabbakuk.23) Chabbakuk [received the tradition] from Nachum.24) Nachum [received the tradition] from Yoel.25) Yoel [received the tradition] from Michah.26) Michah [received the tradition] from Isaiah.27) Isaiah [received the tradition] from Amos.28) Amos [received the tradition] from Hoshea.29) Hoshea [received the tradition] from Zechariah.30) Zechariah [received the tradition] from Yehoyada.31) Yehoyada [received the tradition] from Elisha.32) Elisha [received the tradition] from Elijah.33) Elijah [received the tradition] from Achiah.34) Achiah [received the tradition] from David.35) David [received the tradition] from Shemuel.36) Shemuel [received the tradition] from Eli.37) Eli [received the tradition] from Pinchas.38) Pinchas [received the tradition] from Joshua.39) Joshua [received the tradition] from Moses, our teacher.40) Moses, our teacher, [received the tradition] from the Almighty.