Joshua 1-2 (ESV)
God Commissions Joshua
1:1 After the death of Moses the servant of the Lord, the Lord said to Joshua the son of Nun, Moses’ assistant, 2 “Moses my servant is dead. Now therefore arise, go over this Jordan, you and all this people, into the land that I am giving to them, to the people of Israel.3 Every place that the sole of your foot will tread upon I have given to you, just as I promised to Moses. 4 From the wilderness and this Lebanon as far as the great river, the river Euphrates, all the land of the Hittites to the Great Sea toward the going down of the sun shall be your territory. 5 No man shall be able to stand before you all the days of your life. Just as I was with Moses, so I will be with you. I will not leave you or forsake you. 6 Be strong and courageous, for you shall cause this people to inherit the land that I swore to their fathers to give them. 7 Only be strong and very courageous, being careful to do according to all the law that Moses my servant commanded you. Do not turn from it to the right hand or to the left, that you may have good success  wherever you go. 8 This Book of the Law shall not depart from your mouth, but you shall meditate on it day and night, so that you may be careful to do according to all that is written in it. For then you will make your way prosperous, and then you will have good success. 9 Have I not commanded you? Be strong and courageous. Do not be frightened, and do not be dismayed, for the Lord your God is with you wherever you go.”
Joshua Assumes Command
10 And Joshua commanded the officers of the people, 11 “Pass through the midst of the camp and command the people, ‘Prepare your provisions, for within three days you are to pass over this Jordan to go in to take possession of the land that the Lord your God is giving you to possess.’”
12 And to the Reubenites, the Gadites, and the half-tribe of Manasseh Joshua said, 13 “Remember the word that Moses the servant of the Lord commanded you, saying, ‘The Lord your God is providing you a place of rest and will give you this land.’ 14 Your wives, your little ones, and your livestock shall remain in the land that Moses gave you beyond the Jordan, but all the men of valor among you shall pass over armed before your brothers and shall help them, 15 until the Lord gives rest to your brothers as he has to you, and they also take possession of the land that the Lord your God is giving them. Then you shall return to the land of your possession and shall possess it, the land that Moses the servant of the Lord gave you beyond the Jordan toward the sunrise.”
16 And they answered Joshua, “All that you have commanded us we will do, and wherever you send us we will go. 17 Just as we obeyed Moses in all things, so we will obey you. Only may the Lord your God be with you, as he was with Moses! 18 Whoever rebels against your commandment and disobeys your words, whatever you command him, shall be put to death. Only be strong and courageous.”
Rahab Hides the Spies
2:1 And Joshua the son of Nun sent  two men secretly from Shittim as spies, saying, “Go, view the land, especially Jericho.” And they went and came into the house of a prostitute whose name was Rahab and lodged there. 2 And it was told to the king of Jericho, “Behold, men of Israel have come here tonight to search out the land.” 3 Then the king of Jericho sent to Rahab, saying, “Bring out the men who have come to you, who entered your house, for they have come to search out all the land.” 4 But the woman had taken the two men and hidden them. And she said, “True, the men came to me, but I did not know where they were from. 5 And when the gate was about to be closed at dark, the men went out. I do not know where the men went. Pursue them quickly, for you will overtake them.”6 But she had brought them up to the roof and hid them with the stalks of flax that she had laid in order on the roof. 7 So the men pursued after them on the way to the Jordan as far as the fords. And the gate was shut as soon as the pursuers had gone out.
8 Before the men  lay down, she came up to them on the roof 9 and said to the men, “I know that the Lord has given you the land, and that the fear of you has fallen upon us, and that all the inhabitants of the land melt away before you. 10 For we have heard how the Lord dried up the water of the Red Sea before you when you came out of Egypt, and what you did to the two kings of the Amorites who were beyond the Jordan, to Sihon and Og, whom you devoted to destruction.  11 And as soon as we heard it, our hearts melted, and there was no spirit left in any man because of you, for the Lord your God, he is God in the heavens above and on the earth beneath.12 Now then, please swear to me by the Lord that, as I have dealt kindly with you, you also will deal kindly with my father’s house, and give me a sure sign 13 that you will save alive my father and mother, my brothers and sisters, and all who belong to them, and deliver our lives from death.” 14 And the men said to her, “Our life for yours even to death! If you do not tell this business of ours, then when the Lord gives us the land we will deal kindly and faithfully with you.”
15 Then she let them down by a rope through the window, for her house was built into the city wall, so that she lived in the wall.16 And she said  to them, “Go into the hills, or the pursuers will encounter you, and hide there three days until the pursuers have returned. Then afterward you may go your way.” 17 The men said to her, “We will be guiltless with respect to this oath of yours that you have made us swear. 18 Behold, when we come into the land, you shall tie this scarlet cord in the window through which you let us down, and you shall gather into your house your father and mother, your brothers, and all your father’s household. 19 Then if anyone goes out of the doors of your house into the street, his blood shall be on his own head, and we shall be guiltless. But if a hand is laid on anyone who is with you in the house, his blood shall be on our head. 20 But if you tell this business of ours, then we shall be guiltless with respect to your oath that you have made us swear.” 21 And she said, “According to your words, so be it.” Then she sent them away, and they departed. And she tied the scarlet cord in the window.
22 They departed and went into the hills and remained there three days until the pursuers returned, and the pursuers searched all along the way and found nothing. 23 Then the two men returned. They came down from the hills and passed over and came to Joshua the son of Nun, and they told him all that had happened to them. 24 And they said to Joshua, “Truly the Lord has given all the land into our hands. And also, all the inhabitants of the land melt away because of us.”