Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I see that MinGW shell launches with

sh --login -i

Another way to launch would be like this

sh --login

I know that -i is for interactive shell, but I am not seeing a difference between the two commands.

share|improve this question
up vote 1 down vote accepted

Interactive mode is the default if you don't pass a command to run via -c, and if the standard input/output streams are mapped to terminals.

So specifying -i on the command line is not necessary. It can be in some situations in scripts or when invoking a shell from another program.

See the INVOCATION section in the bash man page:

An interactive shell is one started without non-option arguments and without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)), or one started with the -i option. [...]

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.