What does Matthew 5:6 mean?

Matthew 5:6 KJV
Blessed [are] they which do hunger and thirst after righteousness: for they shall be filled.

Matthew 5:6 NKJV
Blessed [are] those who hunger and thirst for righteousness, For they shall be filled.

Matthew 5:6 MKJV
Blessed [are] they who hunger and thirst after righteousness! For they shall be filled.

Matthew 5:6 KJV 2000
Blessed are they who do hunger and thirst after righteousness: for they shall be filled.

Interlinear KJV

Blessed /makarios/ are they which /ho/ do hunger /peinao/ and /kai/ thirst /dipsao/ after righteousness: /dikaiosune/ for /hoti/ they /autos/ shall be filled. /chortazo/

Albert Barnes’ Commentary

Matthew 5:6 Mt 5:6

Verse 6. Blessed are they that hunger, etc. Hunger and thirst, here, are expressive of strong desire. Nothing would better express the strong desire which we ought to feel to obtain righteousness, than hunger and thirst. No wants are so keen, none so imperiously demand supply as these. They occur daily; and when long continued, as in case of those shipwrecked, and doomed to wander months or years over burning sands, with scarcely any drink or food, nothing is more distressing. An ardent desire for anything is often represented in the Scriptures by hunger and thirst, Ps 42:1; 63:1,2. A desire for the blessings of pardon and peace; a deep sense of sin, and want, and wretchedness, is also represented by thirsting, Isa 55:1,2. Those that are perishing for want of righteousness; that feel that they are lost sinners, and strongly desire to be holy, shall be filled. Never was there a desire to be holy, which God was not willing to gratify. And the gospel of Christ has made provision to satisfy all who truly desire to be holy. See Isa 55:1-13; 65:13; Joh 4:14; 6:35; 7:37,38; Ps 17:15.

{b} “for they shall be filled” Ps 34:19; Isa 65:13