LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 10: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, 12: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



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 02:33 PM
cant login locally keep getting login prompt over and over on redhat linux 5.4 sankarm72 Linux - Newbie 8 04-03-2012 12:06 AM
grub confusion, not automatically loading (always goes back to grub prompt) spyghost Linux - Software 2 01-23-2012 07:00 PM
When power is reset Linux server sits at login prompt, want this to login automatical jenniekingsland Linux - Newbie 1 09-07-2010 07:29 AM
vsftpd login locally, but not remotely. get a login prompt though! ajkett Linux - Server 0 02-22-2007 04:18 AM

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

All times are GMT -5. The time now is 04:37 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
Open Source Consulting | Domain Registration