Sahih al-Bukhari
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ الأَصْبَهَانِيِّ، قَالَ سَمِعْتُ عَبْدَ اللَّهِ بْنَ مَعْقِلٍ، قَالَ قَعَدْتُ إِلَى كَعْبِ بْنِ عُجْرَةَ فِي هَذَا الْمَسْجِدِ ـ يَعْنِي مَسْجِدَ الْكُوفَةِ ـ فَسَأَلْتُهُ عَنْ فِدْيَةٌ مِنْ صِيَامٍ فَقَالَ حُمِلْتُ إِلَى النَّبِيِّ صلى الله عليه وسلم وَالْقَمْلُ يَتَنَاثَرُ عَلَى وَجْهِي فَقَالَ مَا كُنْتُ أُرَى أَنَّ الْجَهْدَ قَدْ بَلَغَ بِكَ هَذَا، أَمَا تَجِدُ شَاةً ". قُلْتُ لاَ. قَالَ " صُمْ ثَلاَثَةَ أَيَّامٍ، أَوْ أَطْعِمْ سِتَّةَ مَسَاكِينَ، لِكُلِّ مِسْكِينٍ نِصْفُ صَاعٍ مِنْ طَعَامٍ، وَاحْلِقْ رَأْسَكَ ". فَنَزَلَتْ فِيَّ خَاصَّةً وَهْىَ لَكُمْ عَامَّةً."
Narrated `Abdullah bin Maqal:
I sat with Ka`b bin Ujra in this mosque, i.e. Kufa Mosque, and asked him about the meaning of: "Pay a ransom (i.e. Fidya) of either fasting or . . . . (2:196)" He said, "I was taken to the Prophet (ﷺ) while lice were falling on my face. The Prophet (ﷺ) said, 'I did not think that your trouble reached to such an extent. Can you afford to slaughter a sheep (as a ransom for shaving your head)?' I said, 'No.' He said, 'Then fast for three days, or feed six poor persons by giving half a Sa of food for each and shave your head.' So the above Verse was revealed especially for me and generally for all of you."
Full reference and source
Sahih al-Bukhari USC-MSA web (English) : Vol. 6, Book 60, Hadith 42 Arabic : Book 65, Hadith 4517
View source on Sunnah.com (opens in a new tab)