LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-04-2015, 11:00 PM   #1
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Rep: Reputation: Disabled
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 ~]#
 
Old 08-05-2015, 01:01 AM   #2
casualfred
Member
 
Registered: Aug 2012
Location: Kentucky, USA
Distribution: Slackware
Posts: 97

Rep: Reputation: 27
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/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu login circle: type userid+p/w, wait a few seconds, returns to login prompt Dart Linux - Newbie 2 10-21-2013 03:33 PM
cant login locally keep getting login prompt over and over on redhat linux 5.4 sankarm72 Linux - Newbie 8 04-03-2012 01:06 AM
grub confusion, not automatically loading (always goes back to grub prompt) spyghost Linux - Software 2 01-23-2012 08:00 PM
When power is reset Linux server sits at login prompt, want this to login automatical jenniekingsland Linux - Newbie 1 09-07-2010 08:29 AM
vsftpd login locally, but not remotely. get a login prompt though! ajkett Linux - Server 0 02-22-2007 05:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration