help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does -bash mean?


From: Jesse Hathaway
Subject: Re: What does -bash mean?
Date: Wed, 6 Apr 2022 10:15:39 -0500

On Wed, Apr 6, 2022 at 10:00 AM Peng Yu <pengyu.ut@gmail.com> wrote:
> Could anybody let me know the meaning of -bash? What does "-" mean? Is
> this conventional documented somewhere ("-" is not searchable, so I
> cannot find where this is documented)?

This is another way of telling bash to start a login shell, from shell.c:

  /* A shell begun with the --login (or -l) flag that is not in posix mode
     runs the login shell startup files, no matter whether or not it is
     interactive.  If NON_INTERACTIVE_LOGIN_SHELLS is defined, run the
     startup files if argv[0][0] == '-' as well. */

Also from the manpage:

       A  login shell is one whose first character of argument zero is a -, or
       one started with the --login option.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]