LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices


By 100101101 at 2014-10-19 13:06
Some people were wondering how to say goodbye to bash.
Personal reasons vary from security risks to bloat, or "Just because I can, and I want too."
Only if you are aware of the risks, have decided it is your OS/machine/time anyway, and are hellbent on this action should you continue.

Run$ dpkg-reconfigure dash
Edit: /etc/passwd - change any entries of "/bin/bash" to "/bin/dash".
Edit: /etc/shells - remove all but /bin/sh, and /bin/dash.
Use your package manager to "purge" the BASH package.
You will be asked to type "Yes, I am aware this is a very bad idea" twice.
From terminal: "executing only in the root directory will not succeed to fix scripts"
cd /bin
find . -type f -exec sed -i 's/bash/dash/g' {} +
cd /sbin
find . -type f -exec sed -i 's/bash/dash/g' {} +
cd /usr
find . -type f -exec sed -i 's/bash/dash/g' {} +
cd /etc
find . -type f -exec sed -i 's/bash/dash/g' {} +

Tip- Have some form of rescue disk as you never know when you will need to chroot/reinstall.
WARNING: some programs, packages, features, and who knows what else will be broken by this action.
Info: I operate as root, notice no "sudo", if you are uncomfortable with root, breaking your OS, or fixing "unsupported" quirks, then DO-NOT perform this action as I doubt you will find help or support.
Trouble: I haven't encountered any issues SO-FAR, but I will update this with Issues/Fixes.

by astrogeek on Thu, 2015-02-26 16:54
Pardon my asking, but this is helpful how, and to who?

Quote:
WARNING: some programs, packages, features, and who knows what else will be broken by this action.
I do not mean to be impolite, but please reconsider this and do not fill LQ with harmful, pointless and useless "how-to's".

How to bork your system, click here!

How to remove all useful programs, ignore warnings and override safeties, click here!

They serve no purpose.

by rokytnji on Thu, 2015-02-26 17:01
I see.

http://vignette1.wikia.nocookie.net/...ricityTest.jpg

by unSpawn on Thu, 2015-02-26 17:29
Quote:
Originally Posted by 100101101 View Post
Info: I operate as root
I dub thee... Darth Facepalm

by jefro on Thu, 2015-02-26 18:35
I always like these posts.

The Be Operating System was build up from ground up without a shell. Linux can't seem and maybe doesn't really need to get along without a shell.

by dugan on Thu, 2015-02-26 18:47
I just read your howto, and it will probably last until the next time you install or upgrade anything with apt-get.

It's tremendously likely that it will leave a lot of stuff in a nonworking state too.

Quote:
Only if you are aware of the risks
How are you going to be aware of the risks if you don't even look at the list of files that you're changing?

Quote:
Originally Posted by jefro View Post
The Be Operating System was build up from ground up without a shell. Linux can't seem and maybe doesn't really need to get along without a shell.
The howto is intended to replace bash with dash.

by veerain on Fri, 2015-02-27 00:45
Debian already has changed from bash to dash as much as possible.

Ubuntu follows debian.

I think it's a matter of distribution makers. Casual users must not attempt. Else there is chance of not functioning OS.

by dunne on Wed, 2015-03-04 14:52


I sym-linked /bin/sh to /bin/ksh (actually pdksh) years ago. The only thing that broke was ldd, which was easily fixed:

Code:
head -1 /usr/bin/ldd
#! /bin/bash
So it seems that Slackware (or slackware 11.0, at least) can live without bash -- ldd is useful but hardly essential. There are a few other scripts around which explicitly require bash i.e. they have a #!/bin/bash line, but nothing important.


by dugan on Wed, 2015-03-04 15:07
Quote:
Originally Posted by dunne View Post
So it seems that Slackware (or slackware 11.0, at least) can live without bash -- ldd is useful but hardly essential. There are a few other scripts around which explicitly require bash i.e. they have a #!/bin/bash line, but nothing important.
You might want to check out this discussion:

Bashism in /etc/rc.d/rc.S

by John VV on Wed, 2015-03-04 15:59
well there is csh and ksh

but almost every "*.sh" script is pointing to "#!/bin/bash " or "#!/bin/sh "

have fun


  



All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
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