Notes on the Bible, by Albert Barnes, , at sacred-texts.com
An harlot's house - In the face of the parallel passages (e. g. Lev 21:7 : Jer 5:7) the rendering advocated for obvious reasons, namely, "the house of a woman, an innkeeper," cannot be maintained. Rahab must remain an example under the Law similar to that Luk 7:37 under the Gospel, of "a woman that was a sinner," yet, because of her faith, not only pardoned, but exalted to the highest honor. Rahab was admitted among the people of God; she intermarried into a chief family of a chief tribe, and found a place among the best remembered ancestors of King David and of Christ; thus receiving the temporal blessings of the covenant in largest measure. The spies would of course betake themselves to such a house in Jericho as they could visit without exciting suspicion; and the situation of Rahab's, upon the wall Jos 2:15, rendered it especially suitable. It appears from Jos 2:4 that Rahab hid them before the King's messengers reached her house, and probably as soon as the spies had come to her house. It is therefore most likely that they met with Rahab outside of Jericho (compare Gen 38:14), and ascertained where in the city she dwelt, and that they might entrust themselves to her care. Rahab (i. e. "spacious," "wide." Compare the name "Japheth" and Gen 9:27, note) is regarded by the fathers as a type of the Christian Church, which was gathered out of converts from the whole vast circle of pagan nations.
I wist not whence they were - Rahab acted as she did from the belief in God's declared word, and conviction that resistance to His will would be both vain and wicked Jos 2:9-11. Thus, she manifested a faith both sound and practical, and is praised accordingly Heb 11:31; Jam 2:25. The falsehood to which she had recourse may be excused by the pressure of circumstances and by her own antecedents, but cannot be defended.
Stalks of flax - literally, "the carded fibres of the tree." The flax in Palestine grew to more than three feet in height, with a stalk as thick as a cane. It was probably with the flax stalks, recently cut (compare Exo 9:31, note) and laid out on the house roof to dry, that Rahab hid the spies.
The sense is, that "they pursued along the way which leads to Jordan and across the fords;" probably those described in Jdg 3:28.
The Lord your God, he is God - From the rumour of God's miraculous interpositions Rahab believed, and makes the self-same confession to which Moses endeavors to bring Israel by rehearsing similar arguments Deu 4:39. Rahab had only heard of what Israel had experienced. Her faith then was ready. It is noteworthy, too, that the same reports which work faith and conversion in the harlot, cause only terror and astonishment among her countrymen. (Compare Luk 8:37-39.)
A true token - literally, "a sign" or "pledge of truth; "something to bind them to keep their promise faithfully. The "token" was the oath which the spies take Jos 2:14.
Our life for yours - See the margin. This is (see Jos 2:17) a form of oath, in which God is in effect invoked to punish them with death if they did not perform their promise to save Rahab's life. Compare the more common form of oath, Sa1 1:26, etc.
Upon the town wall - The town wall probably formed the back wall of the house, and the window opened therefore into the country. (Compare Paul's escape, Co2 11:33).
The "line" or cord was spun of threads dyed with cochineal: i. e., of a deep and bright scarlet color. The color would catch the eye at once, and supplied an obvious token by which the house of Rahab might be distinguished. The use of scarlet in the Levitical rites, especially in those more closely connected with the idea of putting away of sin and its consequences (compare e. g., Lev 14:4, Lev 14:6,Lev 14:51; Num 19:6), naturally led the fathers, from Clement of Rome onward, to see in this scarlet thread, no less than in the blood of the Passover (Exo 12:7, Exo 12:13, etc.), an emblem of salvation by the Blood of Christ; a salvation common alike to Christ's messengers and to those whom they visit.
Unto the mountain - Probably the mountains to the west and north of Jericho, called afterward, from the belief that the 40 days of our Lord's temptation were passed among them, the Quarantania. The spies avoided at the first the neighhourhood of the Jordan, where the pursuers sought them: and amidst the grottoes of the limestone rocks, which in later ages were the abode of numerous hermits, they could readily shelter themselves for three days.