help-bash
[Top][All Lists]
Advanced

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

Re: What does -bash mean?


From: Chet Ramey
Subject: Re: What does -bash mean?
Date: Wed, 6 Apr 2022 11:39:22 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 4/6/22 11:15 AM, Jesse Hathaway wrote:
> 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

This is the historical mechanism: login (via getty) or, in more recent
times, a terminal emulator starts the user shell with the first character
of argv[0] == '-' to indicate it's a login shell. It predates --login by
many years.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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