Toe the line, meaning to conform to rules and authority, is a term with disputed origins.
There is documentation to support the claim that it originates from a time when a ship’s company were mustered for victualling or pay. Each sailor stepped forward to a line marked on the deck or along a crack in deck planking.
That being said, the longest-running use appears to be from the British House of Commons where sword-strapped members were directed to stand behind lines that were better than a sword’s length from their political rivals in order to restore and maintain decorum.
When heated exchanges broke out, the Speaker would direct members to “Toe the line!” This call from the Speaker quelled growing conflicts and returned order to the House of Commons.