Hadithcore
Hadith #2105040

Narrated Anas (RA):

Allah's Messenger (ﷺ) said: "Stand close together in your rows, bring them (the rows) near one another, and stand neck to neck (in straight lines)." [Reported by Abu Dawud and an-Nasa'i. And Ibn Hibban graded it Sahih (authentic)].

وَعَنْ أَنَسٍ, عَنْ اَلنَّبِيِّ ‏- صلى الله عليه وسلم ‏-قَالَ: { رُصُّوا صُفُوفَكُمْ, وَقَارِبُوا بَيْنَهَا, وَحَاذُوا بِالْأَعْنَاقِ.‏ } رَوَاهُ أَبُو دَاوُدَ, وَالنَّسَائِيُّ, وَصَحَّحَهُ اِبْنُ حِبَّانَ .‏ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 2, Hadith 320
Arabic/English book reference
Book 2, Hadith 410