The Ruling on Performing the Obligatory Prayer on a Mount:
❀ Prayer may be performed on a ship and in a boat. When the Messenger of Allah ﷺ was asked about prayer in a boat, he ﷺ said:
صل فيها قائما إلا أن تخاف الغرق
❀ Pray standing in the boat, unless you fear drowning, in which case pray sitting.
Reference: Mustadrak al-Hakim: 275/1, Hadith: 1019
❀ Scholars, by analogy with the above hadith, have permitted performing prayer on an aeroplane, a train and the like.
Reference: Al-Fiqh ala al-Madhahib al-Arba’ah: 206/1
❀ Determine the qiblah before starting the prayer.
Reference: (See the details in “the chapter on the Qiblah”)