LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-09-2005, 11:26 PM   #1
shadkong
Member
 
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114

Rep: Reputation: 15
How to change the default shell to bash?


The slackware's default shell is sh, but I want to change it to bash, How?
Thanks!
 
Old 04-09-2005, 11:30 PM   #2
Namaseit
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 325

Rep: Reputation: 30
???

Uh, what? Actually it is bash. If you look at your user's shell in /etc/passwd it is set to /bin/bash. That is the default. Actually sh just points to bash anyways. So it doesn't really matter.
 
Old 04-09-2005, 11:34 PM   #3
Stang_Man
LQ Newbie
 
Registered: Nov 2004
Distribution: Slackware 10.2, RHEL4 AS
Posts: 29

Rep: Reputation: 15
chsh user /bin/bash
 
Old 04-09-2005, 11:45 PM   #4
Namaseit
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 325

Rep: Reputation: 30
that works too. But like I said. sh = bash

if you do 'ls -l /bin |grep sh' then you will see it just links to bash.
 
Old 04-10-2005, 12:41 AM   #5
shadkong
Member
 
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114

Original Poster
Rep: Reputation: 15
Namaseit, you are right, /bin/sh is a link to /bin/bash.
Thank you!
 
Old 04-10-2005, 09:26 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
According to the bash 'man page', if bash is invoked by the name sh, it will mimic the startup behavior of the 'sh' shell. You may want to find out how changing the default will effect the startup scripts or environment variables used on your system, before going ahead with a change.
 
Old 04-10-2005, 04:29 PM   #7
Stang_Man
LQ Newbie
 
Registered: Nov 2004
Distribution: Slackware 10.2, RHEL4 AS
Posts: 29

Rep: Reputation: 15
Quote:
Originally posted by Namaseit
that works too. But like I said. sh = bash

if you do 'ls -l /bin |grep sh' then you will see it just links to bash.
even though it's a symbolic link in Slackware, how is it on other operating systems??

I've been told by numerous people /bin/sh != /bin/bash. One thing I've been told is /bin/sh lacks TAB completion.
 
Old 04-10-2005, 05:58 PM   #8
Namaseit
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 325

Rep: Reputation: 30
Eh I just did typed in sh on my server and there is tab completion. It's probably just alot of other things maybe.
 
Old 04-10-2005, 07:58 PM   #9
Stang_Man
LQ Newbie
 
Registered: Nov 2004
Distribution: Slackware 10.2, RHEL4 AS
Posts: 29

Rep: Reputation: 15
well, obviously if your /bin/sh is linked to /bin/bash
 
Old 04-10-2005, 09:39 PM   #10
Namaseit
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 325

Rep: Reputation: 30
Well yeah. I thought you were trying to tell me that bash when emulating sh it didn't do tab completion. If in your previous post you just meant that sh and bash are two different things then yes. That is right. Bash is the 'Bourne again shell'. While sh is the "original". There are a ton of other shells. csh, tcsh, ksh, zsh, psh. And about a hundred others.
 
Old 04-22-2005, 09:48 PM   #11
GATTACA
Member
 
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209

Rep: Reputation: 32
Open up a Konsole in KDE.

Go to Settings->Configure Konsole...

Select the "Session" tab

Under "Session" select "Shell".

In the text field marked "Execute" type in: "/bin/bash --login" (without the quotes).

The --login is optional. You can set the color schema in the same window.

HTH.
 
Old 04-23-2005, 02:53 PM   #12
Namaseit
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 325

Rep: Reputation: 30
Yeah but thats just for konsole. He wanted to know for non-gui. If you're in kde that's great. If you aren't using kde or just have headless server that doesn't help too much.
 
Old 04-23-2005, 03:49 PM   #13
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Re: ???

Quote:
Originally posted by Namaseit
Uh, what? Actually it is bash. If you look at your user's shell in /etc/passwd it is set to /bin/bash. That is the default.
this is the default, GUI or not............until root or user changes it.........
 
  


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
change default bash directory in gnome-terminal ming0 Linux - Software 5 10-01-2009 06:54 PM
'sh' shell - Actually calls legacy Bourne shell, or uses system default? Dtsazza Linux - Software 1 10-28-2005 09:20 AM
Slackware 10.2: How do I change default font for shell? PastorFrederick Linux - Newbie 6 10-17-2005 10:10 PM
how change text (and background) color within the bash shell? Xavius Linux - Newbie 4 03-29-2004 02:21 PM
How to change default root shell fessin Linux - General 2 02-13-2003 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:49 AM.

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