[SOLVED] Have sh Be Something Other That Bash/Dash.
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Rep:
Have sh Be Something Other That Bash/Dash.
I can use dpkg-reconfigure dash to switch sh to ether bash or dash.
My favorite shell isn't bash (unlike so many other people...) it's The Z Shell (zsh).
How would I switch sh from dash to zsh (yes I am aware of /etc/passwd and have already edited it and am aware of the slowed boot times). I don't have a GUI just command-line.
Last edited by Zssfssz; 03-11-2012 at 09:48 AM.
Reason: Typo
You should not pick /bin/sh based upon what you like.
You should pick /bin/sh based upon what best supports your system scripts (current and future) as provided by your distribution. Most often that means not messing with it.
You select your OWN shell based upon what you like, and let your SCRIPTS run the one that has the features you like using the '#!' line.
---
That said, it IS possible to change it to any valid shell (or invalid shell, but PLEASE do not do that!) manually. IT is a simple link.
Check the man page and info documents for 'ln' before starting any manual changes, and do understand that you can disable your system if you mess it up.
Yeah, what wpeckham said.
Your system was configured to use bash (or whatever) for reasons understood by the developers. That should have NO influence on what shell or scripting language you prefer to use. If you want to write your scripts using zsh, that should be perfectly fine, and should be done independently of existing system scripts. The default shell used by each user is configurable, as you have already discovered.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Original Poster
Rep:
Anything invoking a shell as sh should only posix features (not to mention that the person could of used /bin/bash or /bin/dash)! ZSH checks to see if it is ran as sh then emulates it as close as possible. Debian is currently just my toy os (occupying only 41Gs on my HD) easily reinstalled, reconfigured (with scripts hosted on the Ubuntu Partition), and deleted. (with less than 500 packages installed and about 400 of them are on the install media the others, again, downloaded to a folder on the Ubuntu partition; Installing the remaining packages is not a problem ) Now to make you happy I'll try it in a qemu test os first.
Now how do I change /bin/sh?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.