![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to change default shell in linux? | princelinux | Shell Programming and Scripting | 8 | 05-07-2009 09:31 AM |
| How to change your default login shell. | klarue7 | Shell Programming and Scripting | 3 | 05-07-2009 09:15 AM |
| Change to ksh shell | irasela | UNIX for Dummies Questions & Answers | 2 | 08-03-2006 01:57 PM |
| How can I change my default shell | milhan | Shell Programming and Scripting | 17 | 07-13-2004 04:15 PM |
| change user in a shell | scottl | UNIX for Dummies Questions & Answers | 2 | 08-28-2003 04:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Change default shell
Hi all
I am a total newbie at anything to do with shells or any form of scripting Unix/Linux etc. I have been trying to run through a tutorial on scripting but it requires the use of sh. My FreeNAS(FreeBSD) test box running the latest nightly build as an embedded install on CF card has csh as default. I have been told: FreeNAS has implemented the following shell's: sh, csh, tcsh and the latest FreeNAS 0.69b4 include bash. The default shell for FreeNAS(FreeBSD) is csh. For portability I'll suggest to use sh (take a look at scripts in /etc/rc.d/ directory), however bash is more advanced. I have seen a few threads on here that suggest changing the 7th item of the relevant user in etc/passwd to the required shell. I have edited it, saved and logout out as root and back in as the user. If I then do echo $shell I get /bin/tcsh So it does not appear to have changed Tried chsh, but get Command Not Found Have also tried one other approach, but cant seem to find the thread again, to let you know what that was, but that also gave a Command not found I had thought of rebooting, but if I do this, as it is and embedded system, the changes get lost. Can any one give me any pointers. Thanks Neil |
|
||||
|
Thanks, I am sure that is true, but as I am just starting out, and wanted to run through this tutorial:
UNIX / Linux Bourne / Bash Shell Scripting Tutorial [ steve-parker.org ] which is written with the bourne shell in mind. It is easier for me if I start from the correct shell. That way at least I know that when something goes wrong, it is something I have done rather than a difference between the tutorial (sh) and the shell I am using (csh) The very first line in the tutorial gets you to change the prompt to $. The command given failed and I assumed I must have been doing something wrong. Turns out that it was the shell differences. I needed to use set prompt="$ " and not what the tutorial gave. Since I first posted, I managed to edit the passwd file and save it to the local HDD, and using the post init command section of the FreeNAS WebGUI, managed to get it to copy across on boot up. Still did not change the user shell though, although the edited and copied version is in /etc. I did forget to mention that I am accessing the box remotely on the local network using PuTTy. I tried using: exec bash It just closed the Putty window down immediately on hitting the RETURN key...but if it had worked, would that not have put me in a bash shell rather than sh? Last edited by npaisnel; 10-08-2008 at 02:35 PM.. |
|
||||
|
Tried that Dan
now when logging in via Putty as root I get bash: Command not found test:~# test being the name of the box I did post another post earlier, but it did not appear, I have tried other methods, also with no result. It now seems to have appeared after Last edited by npaisnel; 10-08-2008 at 02:12 PM.. |
|
||||
|
You need 0.69b4 +, check if you have /bin/bash
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|