Many IT workers use command-line utilities nowadays, and may of those utilities have "command-line arguments". I recently wrote the following sentence in an article:

... specify the option <option> in the command line.

On a later revision, I felt uneasy with the preposition in the above sentence. I have thought about these two alternatives.

... on the command line.

... in the command line arguments.


  • Is the first sentence grammatically correct? (with in) Do I need to replace it (to maintain proper English in my writings)?
  • Are the alternatives I figured out correct and consistent in meaning?

on the command line is the customary way to say it.

"... in the command line arguments" is too short / out of context to be able to judge it.

"in the command line" is grammatically correct, but is not used. It may be correct if you refer to the characters / symbols which form the command line, but without any meaning (as in command, option, value, argument, operator).


I searched for [xyz] in the command line.

I searched for the error in the command line.

Rarely, I encountered "at the command line", but I would feel comfortable using it. Or at least I cannot think of a context where this would be the better choice.

The following is from Wikipedia:

Options follow the command name on the command line, separated by spaces.

The following are taken from the MySQL documentation:

  • Program options specified on the command line follow these rules:
  • Option values that contain spaces must be quoted when given on the command line.
  • Multiple SQL statements may be passed in the option value on the command line, separated by semicolons:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .