Verse 34: And from Lachish Joshua passed unto Eglon, and all Israel with him; and they encamped against it, and fought against it…
Eglon, a city of Judah, Joshua 15:39.
Verse 35: And they took it on that day, and smote it with the edge of the sword, and all the souls that were therein he utterly destroyed that day, according to all that he had done to Lachish.
[On the same day] Namely, on which they had besieged it (Malvenda out of Junius).
On that day on which they first attempted it.
[In the mouth of the sword] What is a mouth to man, by which he devours food, that is the edge to a sword, whereby it consumes whom it strikes (Lapide).
Verse 36: And Joshua went up from Eglon, and all Israel with him, unto (see Josh. 14:13; 15:13; Judg. 1:10) Hebron; and they fought against it…
Hebron: Which though they took and killed all its inhabitants, yet they did not keep it; and therefore when Joshua and his army had forsaken it, and were returned to Gilgal, it seems the giants and other Canaanites being burnt out, or driven away from their former seats, planted and fortified themselves there; which made it necessary for Caleb to take it a second time, as is recorded Joshua 15:14; Judges 1:10. Or this is the same story, and the same conquest of Hebron, which is here generally related, and afterwards repeated, and more particularly described, Joshua 15:13, 14.
Verse 37: And they took it, and smote it with the edge of the sword, and the king thereof, and all the cities thereof, and all the souls that were therein; he left none remaining, according to all that he had done to Eglon; but destroyed it utterly, and all the souls that were therein.
[He took it] That is, Hebron. Objection: But it is narrated that this city was taken afterwards by Caleb, and that giants were cast out, Joshua 15:14; Judges 1:10. Response: In this expedition, Joshua passed over rapidly this region; he did not entirely destroy it. And so whom he pursued he destroyed; otherwise he was not meticulously scouring all hiding places. For this gleaning, as it were, was left to the courage of each Tribe. It was not useful that the land should be left altogether devoid of inhabitants, Exodus 23:29. Therefore, perhaps in the meantime the giants, a mountain-roving race, were in hiding in their caves; or they escaped unto their own countrymen of the cities of Gaza, Gath, and Ashdod. Therefore, it is not strange, if the inhabitants of Hebron, a people savage and strong, should revive and regain their strength (Masius). With the citizens killed, it is likely that those very places were occupied again by other Canaanites [many of whom appear to have been already driven from their seats] and giants. And, since in the following chapters all the giants, besides those that were in the cities of the Philistines, are said to have been killed, it is necessary that these, that were killed by Caleb, Joshua 15, came from elsewhere, from the cities of the Philistines (Bonfrerius). See further discussion on Joshua 15:14 (Serarius).
[And the king thereof] Objection: But he was killed previously, verses 23 and 26. Response: Either, 1. another King was appointed to the place of the slain King (Masius, Vatablus, Serarius, Bonfrerius). For, with the coming of a hostile army, another King was quickly appointed by the citizens (Kimchi in Masius). Or, 2. he repeats the execution of the King, because he is reviewing the general overthrow brought upon the city of Hebrew (Lapide, similarly Masius, Bonfrerius).
The king thereof; either him mentioned before, verse 23, whose death is here repeated in this account of the general destruction of all the inhabitants of that place, or his heir or successor.
[And all the towns] I translate it, municipalities, or municipal cities (Masius out of Kimchi).
All the cities thereof which were subject to its jurisdiction; this being, it seems, a royal city, as Gibeon was, verse 2, and having cities under it as that had, Joshua 9:17.
 Hebrew: וַיַּעֲבֹ֣ר יְ֠הוֹשֻׁעַ וְכָל־יִשְׂרָאֵ֥ל עִמּ֛וֹ מִלָּכִ֖ישׁ עֶגְלֹ֑נָה וַיַּחֲנ֣וּ עָלֶ֔יהָ וַיִּֽלָּחֲמ֖וּ עָלֶֽיהָ׃
 Hebrew: וַֽיִּלְכְּד֜וּהָ בַּיּ֤וֹם הַהוּא֙ וַיַּכּ֣וּהָ לְפִי־חֶ֔רֶב וְאֵת֙ כָּל־הַנֶּ֣פֶשׁ אֲשֶׁר־בָּ֔הּ בַּיּ֥וֹם הַה֖וּא הֶחֱרִ֑ים כְּכֹ֥ל אֲשֶׁר־עָשָׂ֖ה לְלָכִֽישׁ׃
 Hebrew: וַיַּ֣עַל יְ֠הוֹשֻׁעַ וְכָֽל־יִשְׂרָאֵ֥ל עִמּ֛וֹ מֵעֶגְל֖וֹנָה חֶבְר֑וֹנָה וַיִּֽלָּחֲמ֖וּ עָלֶֽיהָ׃
 Hebrew: וַיִּלְכְּד֣וּהָ וַיַּכּֽוּהָ־לְפִי־חֶ֠רֶב וְאֶת־מַלְכָּ֙הּ וְאֶת־כָּל־עָרֶ֜יהָ וְאֶת־כָּל־הַנֶּ֤פֶשׁ אֲשֶׁר־בָּהּ֙ לֹֽא־הִשְׁאִ֣יר שָׂרִ֔יד כְּכֹ֥ל אֲשֶׁר־עָשָׂ֖ה לְעֶגְל֑וֹן וַיַּחֲרֵ֣ם אוֹתָ֔הּ וְאֶת־כָּל־הַנֶּ֖פֶשׁ אֲשֶׁר־בָּֽהּ׃
 See Joshua 11:22; 1 Samuel 6:17.