Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7917091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:02:02+00:00 2026-06-03T15:02:02+00:00

I am a beginner to bash and in general using shell. When I open

  • 0

I am a beginner to bash and in general using shell. When I open a terminal, it comes up with a prompt like this:

myusername@dev94:~>

where myusername is in blue, dev94 is in red and > is in green (I understand that this color configuration is probably in my .bashrc file). Here is my question: When I type exit and hit enter, this happens:

myusername@dev94:~>
exit
exit
myusername@dev94:~>

The myusername@dev94:~> is all in black without any color. What is difference between the one in colors before I typed exit and the colorless one after I typed exit?
(On a side note, I only typed the first exit. The second exit comes by itself when I hit enter. Wondering where the second exit is coming from. Is it just a bash/shell thing in every shell?)

If I type exit again (at the colorless prompt) and hit enter, then shell closes. I can understand this that the shell process quits and the window is closed. My 2nd question:
Why didnt it close when I first typed exit at the colored prompt itself. Why did it go from the colored to the colorless prompt for the first exit command?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:02:04+00:00Added an answer on June 3, 2026 at 3:02 pm

    Maybe your shell sets a SHELL variable, but this isn’t a must, and it is not necessarily correct:

    echo $SHELL
    /bin/bash
    

    If you look with ps ax –forest at your process list:

    ps ax --forest 
    

    you should find the ps command yourself, above that the inner Shell, above that the outer shell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Absolute beginner question: I have a template file index.html that looks like this: ...
I'm beginner at bash shell programming. Can you tell me about '$$' symbols in
Beginner here. Why is this an endless loop ? for (p = 0; p
Beginner here: In this answer to my question of how to insert data into
I am a beginner in using Rails and Git I have InstantRails installed and
Hello bash beginner question. I want to look through multiple files, find the lines
I have a config.txt file with IP addresses as content like this 10.10.10.1:80 10.10.10.13:8080
iOS beginner here. I'm using the following code to save my facebook accessToken and
very beginner question. I am using Rails 3's query interface as shown: class User
I like GNU/Linux and writing bash scripts to automatize my tasks. But I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.