LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-08-2008, 08:27 AM   #1
djuro-san
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
A question about different shells


Hello,

Why is it that when I SSH to one server, I get the shell prompt in the following format:

[root@server1 ~]#

And on another, I get it like this:

bash2.0 $

Both are Bash shells, so what is the difference?

Many thanks!
 
Old 11-08-2008, 08:32 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Basically, different operating systems set different prompts. The first one you posted is a Red Hat/Fedora like prompt. The other one is a generic bash prompt. The environment variable PS1 controls the way a prompt is displayed.
 
Old 11-08-2008, 08:36 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Short answer: Because they are configured differently....

What you need is to change the PS1 variable. Here's one article on how to do it:
http://www.cyberciti.biz/tips/howto-...up-prompt.html

I thought there was a man page....???
 
Old 11-08-2008, 08:36 AM   #4
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
No difference - it's just that bash environment is set up differently on different machines (see ~/.bashrc , /etc/profile) where variables can be set any way you want it, including prompt, colours etc.

('#' normally means you're logged in as root, and '$' - as ordinary user)
 
Old 11-08-2008, 09:06 AM   #5
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.2
Posts: 1,085

Rep: Reputation: 195Reputation: 195
Quote:
Originally Posted by djuro-san View Post
Why is it that when I SSH to one server, I get the shell prompt in the following format:

[root@server1 ~]#

I'm hoping you're not allowing root login via ssh....

cheers,
 
Old 11-08-2008, 09:11 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by mrclisdue View Post
I'm hoping you're not allowing root login via ssh....

cheers,
Off-topic, but......If I were using SSH to get into another computer (server or otherwise) to do system maintenance, how would I do this without logging in as root?
 
Old 11-08-2008, 09:16 AM   #7
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Quote:
Originally Posted by pixellany View Post
Off-topic, but......If I were using SSH to get into another computer (server or otherwise) to do system maintenance, how would I do this without logging in as root?
Log in as normal user, then 'su'.

First thing I do on any machine I have to adminster via ssh - disable root login, change port, disable password authentication.
 
Old 11-08-2008, 09:18 AM   #8
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.2
Posts: 1,085

Rep: Reputation: 195Reputation: 195
Quote:
Originally Posted by pixellany View Post
Off-topic, but......If I were using SSH to get into another computer (server or otherwise) to do system maintenance, how would I do this without logging in as root?
I would login as a user, then either sudo, or su to root. Teeny little security measure (at its simplest level, an adversary would then have to circumvent authentication measures twice...)

I agree, off-topic, tho'.

cheers,
 
  


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 question, regarding shells - urgent please! hunterhunter Linux - Software 8 03-27-2006 03:55 PM
help on the different shells... JoannesX Programming 2 02-06-2005 12:07 PM
do I need all the shells? helpme0904 Fedora 6 10-01-2004 03:03 PM
Parallel shells? (cluster question) Blinker_Fluid Linux - General 1 02-14-2004 01:49 AM
Shells andrewtc Linux - Newbie 3 05-01-2003 04:52 PM

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

All times are GMT -5. The time now is 10:57 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