Invoking Bash and Start-Up Files for Your Open Source Software Needs | Linux Today

Invoking Bash and Start-Up Files for Your Open Source Software Needs

Written By
JK
Juliet Kemp
Jun 15, 2010

“If you’ve ever tried to change system-wide bash settings, you
know there are three major ways of invoking bash, all of which
behave differently when reading in settings files.

“Interactive login shell (e.g., when logging in from the console
or via ssh)
Interactive non-login shell (e.g., when you run bash at a terminal
prompt)
Non-interactive shell (e.g., to run a shell script)

“An interactive shell has both input and output connected to a
tty (usually the user’s terminal). If you type echo $- and the
value contains i, the shell is interactive. (The other letters are
options passed in at invocation, or via the set builtin.) A login
shell is started with the –loginoption. This is usually handled by
whatever program you’re using for login.”


Complete Story

JK

Juliet Kemp

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.