Negative commandment · Lo Ta’aseh #321 of 613
Not to travel beyond the boundaries of a city on the Shabbat as travelers do
שלא להלך חוץ לתחום מדינה כהולכי דרכים בשבת
The verse · Shemot 16:29
רְאוּ כִּי־ה׳ נָתַן לָכֶם הַשַּׁבָּת עַל־כֵּן הוּא נֹתֵן לָכֶם בַּיּוֹם הַשִּׁשִּׁי לֶחֶם יוֹמָיִם שְׁבוּ אִישׁ תַּחְתָּיו אַל־יֵצֵא אִישׁ מִמְּקֹמוֹ בַּיּוֹם הַשְּׁבִיעִי
“See, that the Lord has given you the sabbath, therefore he gives you on the sixth day the bread of two days: remain every man in his place, let no man go out of his place on the seventh day.”
The Rambam’s words
Not to travel beyond the boundaries of a city on the Shabbat as travelers do, as [Exodus 16:29] states: "A person should not leave his place [on the Shabbat day]."
שלא להלך חוץ לתחום מדינה כהולכי דרכים בשבת, שנאמר "אל ייצא איש ממקומו" (שמות טז,כט).
Why · Sefer HaChinuch #24
That we should not go outside of the boundary (techum) on Shabbat
“From the roots of this commandment are that we should remember and know that the world is created and not primordial, as it is written explicitly about the commandment of Shabbat (Exodus 20:11), “For in six days the Lord made the heavens and the earth, the sea and all that is in them, and He rested on the seventh day.””
Who & when
“And [it] is practiced in every place and at all times by males and females.”
Where in the Mishneh Torah
Hilchot Sabbath הלכות שבת