LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   login prompt confusion (https://www.linuxquestions.org/questions/linux-newbie-8/login-prompt-confusion-4175549859/)

arun natarajan 08-04-2015 11:00 PM

login prompt confusion
 
Hi,

Current shell environment is BASH. How shd i switch between these two login prompts and what is meaning for the both when we use each. pls assist.

bash-4.3#

[root@localhost ~]#

casualfred 08-05-2015 01:01 AM

You can actually customize the prompt for your BASH shell however you wish.

For the login shell (when you first boot up your computer, if it boots to a shell):
it will first read and execute commands from /etc/profile, ~/.bash_profile, ~/.bash_login, and ~/.profile

For an interactive shell that is not a login shell:
it will read and execute commands from ~/.bashrc

So, to change the prompts for your BASH shell, just edit the "PS1=..." entry in one of those files (if they exist).

This is a useful guide:
http://www.ibm.com/developerworks/li.../l-tip-prompt/


All times are GMT -5. The time now is 04:59 AM.