Then Pharaoh sent and called Joseph
Sent messengers to him to come to him directly, ordered the captain of the guard, or keeper of prison, to loose him, and let him free, see ( Psalms 105:20 ) ; and they brought him hastily out of the dungeon;
that is, out of the prison house; which, as Jarchi says, was made like a ditch or dungeon, or in which the dungeon was where Joseph was first put when he was brought to prison; though it cannot be thought that he continued there when he had so much respect shown him by the keeper, and had other prisoners committed to his care: however, he was fetched in great haste from his place of confinement, by the messengers that were sent for him; or "they made him to run" F8, from the prison to the palace, the king being so eager to have his dream interpreted to him: and he shaved [himself];
or the barber shaved him, as Aben Ezra; his beard had not been shaved, nor the hair of his head cut very probably for a considerable time; it being usual for persons in such circumstances to neglect such things: and changed his raiment;
his prison garments being such as were not fit to appear in before a king, and put on others, which either the king sent him, or the captain of the guard his master furnished him with: and came in unto Pharaoh:
into his palace, and his presence; what city it was in which this Pharaoh kept his palace, is no where said; very probably it was which the Scriptures call Zoan, that being the ancient city of Egypt, ( Numbers 13:22 ) .