Obviously, he did not literally see all the kingdoms; there is no literal mountain from which all of them can be seen. So Satan may have used some sort of vision to show these to Jesus, similar to the way a projector and a screen can be used to show someone pictures of various places on earth.
بما انه لا يوجد على الارض جبل يطل على الممالك كلها ،‏ فربما اراه الشيطان اياها بواسطة رؤيا ،‏ تماما مثلما نشاهد على شاشة سينما صورا لعدة اماكن حول العالم .‏