LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-20-2010, 06:05 PM   #1
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 125

Rep: Reputation: 16
shell prompt


i am not able to login as [root@abc00 ~]# i am getting -bash-3.2# as shell prompt

how to recover it.

Last edited by abhijeetdutta; 04-21-2010 at 05:37 PM.
 
Old 04-20-2010, 06:09 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,599

Rep: Reputation: 516Reputation: 516Reputation: 516Reputation: 516Reputation: 516Reputation: 516
that's your shell prompt, not a login prompt.

Code:
export PS1=" [\u@\h \w]# "
To make it permanent, add that line to root's ~/.bashrc
 
Old 04-21-2010, 05:41 PM   #3
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 125

Original Poster
Rep: Reputation: 16
your command works.thanks! but it will be more helpful PS1="[\u@\h \W]\\$ " when i have entered the command in bash_profile instead of bashrc.
 
Old 04-22-2010, 02:05 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,524
Blog Entries: 27

Rep: Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175
Quote:
Originally Posted by abhijeetdutta View Post
your command works.thanks! but it will be more helpful PS1="[\u@\h \W]\\$ " when i have entered the command in bash_profile instead of bashrc.
It is conventional for root's prompt to end in "# " as a visual reminder that you are running with awesome rootly powers.

A common solution to get the same interactive shell configuration for both login and non-login shells is to modify /etc/profile to include
Code:
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
 
  


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
vsftpd login locally, but not remotely. get a login prompt though! ajkett Linux - Server 0 02-22-2007 04:18 AM
unable to login because no login prompt DX2 Linux - General 1 05-25-2005 12:33 PM
login prompt - can only login as root mindfriction Linux - Newbie 6 09-03-2004 07:14 AM
no prompt after login martin-bob Linux - Software 3 12-19-2003 01:59 PM
How get to the prompt before login majon96 Linux - Newbie 2 06-11-2002 01:46 PM


All times are GMT -5. The time now is 02:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration