1 Now after the death of Moses the servant of the LORD, it came to pass, that the LORD spoke to Joshua the son of Nun, Moses's minister, saying, 2 "Moses my servant is dead. Now therefore, arise, go over this Jordan—you and all this people—to the land which I give to them, even to the children of Israel. 3 Every place that the sole of your foot shall tread upon, I have given to you, as I said to Moses. 4 From the wilderness and this Lebanon even to the great river, the Euphrates River, all the land of the Hittites, and to the Great Sea toward the setting of the sun, shall be your border. 5 There shall not be any man able to stand before you all the days of your life. As I was with Moses, so I will be with you. I will not fail you, nor forsake you. 6 Be strong and of a good courage, for to this people you shall divide for an inheritance the land which I swore to their fathers to give them. 7 Only be strong and very courageous so that you may observe to do according to all the law which Moses my servant commanded you. Do not turn from it to the right hand or to the left so that you may prosper wherever you go. 8 This book of the law shall not depart out of your mouth, but you shall meditate in it day and night so that you may observe to do according to all that is written therein. For then you shall make your way prosperous, and then you shall have good success. 9 Have I not commanded you? Be strong and of a good courage. Do not be afraid, neither be dismayed, for the LORD your God is with you wherever you go."
10 Then Joshua commanded the officers of the people, saying, 11 "Pass through the host and command the people, saying, 'Prepare yourselves provisions, for within three days you shall pass over this Jordan to go in to possess the land which the LORD your God gives you to possess it.'"
12 And to the Reubenites, to the Gadites, and to half the tribe of Manasseh, Joshua spoke, saying, 13 "Remember the word which Moses the servant of the LORD commanded you, saying, 'The LORD your God has given you rest and has given you this land.' 14 Your wives, your little ones, and your cattle shall remain in the land which Moses gave you on this side of the Jordan, but you shall pass before your brothers armed, all the mighty men of valor, and help them, 15 Until the LORD has given your brothers rest, as he has given you, and they also have possessed the land which the LORD your God gives them. Then you shall return to the land of your possession and enjoy it, which Moses the LORD'S servant gave you on this side of the Jordan toward the sunrise."
16 And they answered Joshua, saying, "All that you command us, we will do, and wherever you send us, we will go. 17 According as we listened to Moses in all things, so we will listen to you. Only may the LORD your God be with you, as he was with Moses. 18 Everyone who rebels against your commandment and will not listen to your words in all that you command him shall be put to death. Only be strong and of a good courage."
[v.5] - Quoted in Hebrews 13:5. Reference, Deuteronomy 31:6, 8.