LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-11-2012, 09:46 AM   #1
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Rep: Reputation: Disabled
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
 
Old 03-11-2012, 12:53 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
no no no no no no no no ...

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.
 
Old 03-11-2012, 12:59 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

--- rod.
 
Old 03-12-2012, 12:08 AM   #4
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
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?
 
Old 03-12-2012, 07:34 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
/bin/sh is nothing more than a symlink to the shell in use. Just let it point to /bin/zsh to achieve what you want.
 
Old 03-15-2012, 08:48 AM   #6
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493

Rep: Reputation: Disabled
...or perhaps 'chsh' is what you are after....
 
  


Reply

Tags
debian, shells, zsh



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
[SOLVED] difference between /bin/bash and /bin/dash and compatibility with POSIX kakk2 Linux - Software 7 11-11-2011 01:17 PM
bash (esc dash) key combo? szboardstretcher Linux - Software 1 08-23-2011 01:34 PM
BASH/Dash : how to put a JPEG or PNG into the Clipboard? Xeratul Linux - General 10 12-08-2010 03:06 PM
gtkdialog + glade + bash/dash/sh librano Programming 4 11-26-2009 02:46 AM
Need help with BASH and DASH cosmicbrat Linux - Software 1 03-12-2009 08:39 PM

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

All times are GMT -5. The time now is 06:32 PM.

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