كتاب صلاة المسافرين وقصرها
6
The Book of Prayer - Travellers
(25)
Chapter: Encouragement to pray qiyam during Ramadan, which is Tarawih
(25)
باب التَّرْغِيبِ فِي قِيَامِ رَمَضَانَ وَهُوَ التَّرَاوِيحُ ‏

Abu Huraira reported:

The Messenger of Allah (ﷺ) used to exhort (his Companions) to pray (at night) during Ramadan without commanding them to observe it as an obligatory act, and say: He who observed the night prayer in Ramadan because of faith and seeking his reward (from Allah), all his previous sins would be forgiven. When Allah's Messenger (ﷺ) died, this was the practice, and it continued thus during Abu Bakr's caliphate and the early part of 'Umar's caliphate.
وَحَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، أَخْبَرَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُرَغِّبُ فِي قِيَامِ رَمَضَانَ مِنْ غَيْرِ أَنْ يَأْمُرَهُمْ فِيهِ بِعَزِيمَةٍ فَيَقُولُ ‏ "‏ مَنْ قَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏"‏ ‏.‏ فَتُوُفِّيَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَالأَمْرُ عَلَى ذَلِكَ ثُمَّ كَانَ الأَمْرُ عَلَى ذَلِكَ فِي خِلاَفَةِ أَبِي بَكْرٍ وَصَدْرًا مِنْ خِلاَفَةِ عُمَرَ عَلَى ذَلِكَ ‏.‏
Reference : Sahih Muslim 759 b
In-book reference : Book 6, Hadith 208
USC-MSA web (English) reference : Book 4, Hadith 1663
  (deprecated numbering scheme)