The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executable directory general question FredSmith UNIX for Dummies Questions & Answers 1 05-17-2006 02:14 PM
general question on executing file in drwx--x--x directory cul8erppl Shell Programming and Scripting 2 07-20-2005 01:19 AM
general question? wmosley2 Shell Programming and Scripting 2 12-17-2003 08:55 PM
General Proxy Question sam_pointer UNIX for Dummies Questions & Answers 1 09-24-2001 07:36 PM
General Proxy Question sam_pointer IP Networking 1 09-18-2001 04:24 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-12-2002
Registered User
 

Join Date: Nov 2002
Location: United States of America
Posts: 1
Question General Question

Hi, I've been racking my brains trying to remember, but, whats the command to change the default shell? I'm currently always in the Korn shell and I want to start out in the Bash shell. I'm running a variant of BSD I guess in Mac OS X 10.2.2 and Mandrake. Thanks.

ccindyderek
Forum Sponsor
  #2 (permalink)  
Old 11-12-2002
yls177
Guest
 

Posts: n/a
sh, (bourne shell? )
ksh (korn shell)
csh for c shell
  #3 (permalink)  
Old 11-12-2002
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
In Mandrake, use the command (at the command line of course) "chsh".

In MacOSX, it's a little more complicated...
You have to change it in NetInfo Manager. Go to "Macintosh HD/Applications/Utilities/NetInfo Manager" (as an admin), select "/", "users", your user ID. In the bottom pane, select the "shell" attribute, click the lock in the bottom-hand corner and enter the admin password. Edit the shell attribute to point the full path to your shell (/bin/bash is a common one, unless you've installed ksh...).

If you want to be thorough, and use the same shell in single user mode (if you hold down command-s while booting), you have to edit the files /etc/passwd and /etc/master.passwd. An easy way to do this is with the pico editor using Terminal.app. In the terminal, do:
sudo pico /etc/passwd
and
sudo pico /etc/master.passwd

Find your username, and on the last line, you'll have to change your shell manually from /bin/csh to whatever you want (/bin/bash, etc...). You can use the chsh commandin MacOSX, but it doesn't update both files.

Let me know if you have any questions.
  #4 (permalink)  
Old 11-12-2002
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Oops, I almost forgot, you can get the "real" ksh from AT&T...
Mandrake comes with pdksh, a ksh clone, and MacOSX doesn't come with one.
Here is a direct link to Ksh93 at ATT.com:
http://www.research.att.com/~gsf/dow....darwin.ppc.gz

Once it's unpacked on OSX (Stuffit usually does it automatically), you can move it to /bin with the Terminal.

The Linux standalone is here:
http://www.research.att.com/~gsf/dow....linux.i386.gz

It should work the same way...

Again, please post back with any problems or questions...
  #5 (permalink)  
Old 11-13-2002
WIntellect's Avatar
Registered User
 

Join Date: Sep 2002
Location: United Kingdom
Posts: 170
In FreeBSD - and OpenBSD if I remember correctly, type
Code:
chpass
Using your default editor type, change the line entatled "Shell" to point to the shell you want to use - then log out and log in again!
__________________
FreeBSD - Opening computers from closed Windows
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0