LinuxQuestions.org
Register a domain and help support LQ
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 10-19-2006, 08:48 AM   #1
msgforsunil
Member
 
Registered: Jun 2006
Posts: 38

Rep: Reputation: 15
Does setting of BASH as the default shell has any effect?


Hi All,

By default my machine has sh as the default shell. Would setting bash as my default shell, has any negative effects like not able to logon to FTP or something on the similar lines?

Cheers
Sunil
 
Old 10-19-2006, 09:08 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware64 14.0
Posts: 1,525

Rep: Reputation: 94
What does "ls -l /bin/sh" give you? On my system (Slackware) sh is just a symlink to /usr/bin/bash, so that it doesn't matter. Maybe it's the same on your machine ...
 
Old 10-19-2006, 10:57 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
"sh" is a symlink to "bash" on my old Red Hat box too.
Since "bash" has evolved from sh, it should be backwards compatible with it. This implies that you can replace "sh" with "bash" anywhere you like, but not the other way around.

Try "ls -l /bin/bash" (or ls -l /usr/bin/bash) to see if you have bash installed already.
 
Old 10-19-2006, 02:13 PM   #4
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
/bin/bash and /bin/sh are not entirely identical since bash starts up slightly differently if invoked as sh (see the INVOCATION section of the man page).
 
Old 10-20-2006, 03:01 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
@soggycornflake: indeed, both are not 100% identical.
But Bash should be able to run sh scripts without many problems though (ie it should be more or less "backwards compatible", otherwise the already mentioned symlinks wouldn't make much sense).
 
Old 10-20-2006, 04:39 PM   #6
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,056

Rep: Reputation: 94
Quote:
Originally Posted by msgforsunil
Hi All,

By default my machine has sh as the default shell. Would setting bash as my default shell, has any negative effects like not able to logon to FTP or something on the similar lines?

Cheers
Sunil
No it should not have any negative effects. We actually do that at our work. Certain users have bash while other have the korn shell.
 
Old 10-20-2006, 04:51 PM   #7
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
On most distros, sh is just a symlink to bash. Bash is backwards compatible with sh and behaves just like sh if called using the "sh" command. On other Unix OSes, sh is a symlink either ksh or pdksh, but bash is usually available as an option.
 
Old 10-22-2006, 11:41 PM   #8
msgforsunil
Member
 
Registered: Jun 2006
Posts: 38

Original Poster
Rep: Reputation: 15
Thanks to all for the quick responses.

Cheers
Sunil Kumar
 
  


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
bash shell by default khattaking Solaris / OpenSolaris 13 08-08-2006 11:39 AM
I made a shortcut to a shell script and it is using default shell icon... shlinux Linux - Software 2 04-20-2006 07:29 AM
'sh' shell - Actually calls legacy Bourne shell, or uses system default? Dtsazza Linux - Software 1 10-28-2005 10:20 AM
How to change the default shell to bash? shadkong Slackware 12 04-23-2005 04:49 PM
setting default page size and default tray lived4eva Linux - General 1 11-04-2003 03:39 PM


All times are GMT -5. The time now is 08:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration