View Full Version : How do I change shells?
Titanium Man
02-03-2002, 11:48 PM
Hi all, can someone tell me how to change shells? I looked in /etc/shells did ls, and saw this:
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/sh
/bin/tcsh
/bin/zsh
Does that mean I can change to bash if I want, or that I'll first have to GET bash, then it will work. In either case, how do I change to bash (and back to tcsh) without erasing my home directory (or screwing something else up)? I saw there's a command chpass with the -s option but I'm afraid to try it before I ask for help. Thanks
W3iRd0
02-04-2002, 12:05 AM
You can jump between shells as you wish. Just type the name in (i.e. bash, csh, sh...).
You can also change your default shell via Netinfo Manager, find your name under users, and change /bin/tcsh into the shell you want.
Titanium Man
02-04-2002, 12:14 AM
Thanks for replying. I tried typing in bash, and got a command not found message. Any ideas?
W3iRd0
02-04-2002, 01:52 AM
try locate bash or which bash, if both of these turn up with nothing, bash is not installed, but csh, sh and zsh should all be installed (bash is installed on my comp, I thought it was standard....)
If it isn't, you'll just have to install it (I have no idea about where it's available, except maybe fink...).
rusto
02-04-2002, 07:11 AM
YOu can also change the default shell for Terminal in Terminal prefs, just change the portion to the right of /bin/
Titanium Man
02-04-2002, 09:57 AM
Thanks guys! The other shells (sh, zsh, csh) seem to work, but I guess I don't have bash. Luckily, fink does.
rusto
02-04-2002, 10:40 AM
Here's a good tutorial on installing Bash...as well as X win:
http://www.bombich.com/mactips/x1.html
mervTormel
02-04-2002, 01:01 PM
if you want a fresh different shell environment from shell A to shell B, use exec
% ps
PID TT STAT TIME COMMAND
25711 std Ss 0:00.27 -tcsh (tcsh)
% exec bash
$ ps
PID TT STAT TIME COMMAND
25711 std Ss 0:00.35 bash
$ exec tcsh
% ps
PID TT STAT TIME COMMAND
25711 std Rs 0:00.56 -csh (tcsh)
the builtin shell command exec executes the specified command in place of the current shell, basically exec [this command replaces shell]
experiment: open new terminal window and type:
% exec ls
it supercedes the basic fork & exec behavior, re-using the current PID, if there is no shell to return to, it exits.
useful? choose a shell for your ususal login and get to other shells with exec
Originally posted by rusto
Here's a good tutorial on installing Bash...as well as X win:
http://www.bombich.com/mactips/x1.html
...or if you're too lazy (like me), download a precompiled version here:
http://www.apple.com/downloads/macosx/unix_apps_utilities/bashthegnubourneagainshell.html
works fine for me, my standard shell
Hes Nikke
02-27-2002, 11:51 AM
now all i need to do is figure out my configs so that my terminals at school and home match
at school we use bash, and at home i use the default (tcsh?) :cool:
the problem is that even though i copied my conifig files between machines (.bashrc/.cshrc) i can't get either to act like the other!
personaly i like tcsh using this tweek (http://www.macosxhints.com/article.php?story=20020215085858541) how do i get bash to do that? if i can get bash to do that, my tcsh at home and my bash at school will be the same :D (as far as i can tell/care :p )
BTW, it wouldn't let me post with the smilies on, is that a bug?
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.