The first one to greet him with that title was al-Mughīrah ibn Shuʿbah, though others are also mentioned; Allah knows best.
Ibn Jarīr said (1): “Aḥmad ibn ʿAbd al-Ṣamad al-Anṣārī related to me; Umm ʿAmr bint Ḥassān al-Kūfiyyah—she had reached the age of one hundred and thirty years—narrated to me from her father, who said:
When ʿUmar assumed authority the people addressed him, ‘O successor to the successor of the Messenger of Allah.’ ʿUmar replied, ‘That phrase is too long. You are the believers, and I am your commander.’ From then on he was called the Commander of the Believers.
In summary (2): After completing the pilgrimage in 23 AH, ʿUmar (may Allah be pleased with him) camped at al-Abṭaḥ. There he supplicated Allah (Glorified and Exalted), complaining that old age (3) had overtaken him, his strength had waned, and his flock had spread far and wide; he feared falling short. He asked Allah to take him to Himself and to grant him martyrdom in the city of the Prophet ﷺ, as is authentically reported from him (4): “O Allah, I ask You for martyrdom in Your path and a death in the city of Your Messenger.” Allah (5) answered that prayer, combining both requests for him—martyrdom in Madinah itself, a great rarity, yet Allah is Most Subtle in whatever He wills.
It occurred that Abū Luʾluʾah Fīrūz—Magian by origin and Roman by residence—attacked him while he was standing in the miḥrāb at the dawn prayer on Wednesday, when four nights of Dhū al-Ḥijjah remained that same year. Armed with a double-edged dagger, he struck ʿUmar three times—some say six—one blow beneath the navel, severing the abdominal wall, and ʿUmar collapsed. He appointed ʿAbd al-Raḥmān ibn ʿAwf to lead the prayer. The assailant then ran brandishing his dagger, stabbing anyone he passed, wounding thirteen men of whom six died. ʿAbd Allāh ibn ʿAwf cast a cloak over him, whereupon the wretch (6) killed himself—may Allah curse him.
ʿUmar was carried home while blood poured from his wound, all before sunrise. He would come to and then faint, and whenever they reminded him of the prayer he revived and said, “Yes; whoever abandons it has no share in Islam.” He then prayed on time. Afterwards he asked, “Who killed me?” They replied, “Abū Luʾluʾah, the slave of al-Mughīrah ibn Shuʿbah.” He said, “Praise be to Allah who did not make my death at the hands of a man who claims faith yet has never prostrated to Allah even once.”
He added, “May Allah disgrace him! We had always ordered that he be treated well.” Al-Mughīrah had levied two dirhams on him each day. Later he asked ʿUmar to increase his tribute, for the man was a carpenter, engraver, and blacksmith, so ʿUmar raised it to one hundred per month. ʿUmar had also told him, “I hear you can fashion a mill that turns by wind.” Abū Luʾluʾah replied, “Indeed—by Allah I shall make for you a mill that people in the East and West will talk about!” That was on Tuesday evening; he stabbed him at dawn on Wednesday, four nights before the end of Dhū al-Ḥijjah.
Before his death ʿUmar stipulated that the matter of succession should be settled by consultation among six men with whom the Messenger of Allah ﷺ had passed away while pleased: ʿUthmān, ʿAlī, Ṭalḥah, al-Zubayr, ʿAbd al-Raḥmān ibn ʿAwf, and Saʿd ibn Abī Waqqāṣ.