What is the meaning of 1 Kings 2:3?

(1 Kings 2:3 KJV) And keep the charge of the LORD thy God, to walk in his ways, to keep his statutes, and his commandments, and his judgments, and his testimonies, as it is written in the law of Moses, that thou mayest prosper in all that thou doest, and whithersoever thou turnest thyself:

(1 Kings 2:3 ASV) and keep the charge of Jehovah thy God, to walk in his ways, to keep his statutes, [and] his commandments, and his ordinances, and his testimonies, according to that which is written in the law of Moses, that thou mayest prosper in all that thou doest, and whithersoever thou turnest thyself.

(1 Kings 2:3 DBY) and keep the charge of Jehovah thy God, to walk in his ways, to keep his statutes, and his commandments, and his ordinances, and his testimonies, as it is written in the law of Moses, that thou mayest prosper in all that thou doest and whithersoever thou turnest thyself;

(1 Kings 2:3 YLT) and kept the charge of Jehovah thy God, to walk in His ways, to keep His statutes, His commands, and His judgments, and His testimonies, as it is written in the law of Moses, so that thou dost wisely all that thou dost, and whithersoever thou turnest,

(1 Kings 2:3 WEB) and keep the charge of Yahweh your God, to walk in his ways, to keep his statutes, [and] his commandments, and his ordinances, and his testimonies, according to that which is written in the law of Moses, that you may prosper in all that you do, and wherever you turn yourself.

Interlinear

And keep <shamar> the charge <mishmereth> of the LORD <Y@hovah> thy God, <‘elohiym> to walk <yalak> in his ways, <derek> to keep <shamar> his statutes, <chuqqah> and his commandments, <mitsvah> and his judgments, <mishpat> and his testimonies, <`eduwth> as it is written <kathab> in the law <towrah> of Moses, <Mosheh> that thou mayest prosper <sakal> in all that thou doest, <`asah> and whithersoever thou turnest <panah> thyself: (1 Kings 2:3 KJV)

Adam Clarke’s Commentary

Verse 3.  Keep the charge of the Lord] Keep what God has given thee to keep.

1. Walk in his ways. Not in thine own, nor in the ways of a wicked, perishing world.

2. Keep his statutes. Consider all his appointments to be holy, just, and good; receive them as such, and conscientiously observe them.

3. Keep his commandments. Whatever he has bidden thee to do, perform; what he has forbidden thee to do, omit.

4. Keep his judgments. What he has determined to be right, is essentially and inherently right; what he has determined to be wrong or evil, is inherently and essentially so. A thing is not good because God has commanded it; a thing is not evil because he has forbidden it. He has commanded the good, because it is in its own nature good and useful; he has forbidden the evil, because it is in its own nature bad and hurtful. Keep therefore his judgments.

5. Keep his testimonies. Bear witness to all to which he has borne witness. His testimonies are true; there is no deceit or falsity in them. His testimonies refer also to future good things and good times; they are the significators of coming blessedness: as such, respect them.

That thou mayest prosper] If thou hast God’s approbation, thou wilt have God’s blessing. If thy ways please him, he will not withhold from thee any manner of thing that is good.