Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I accidentally deleted most of /usr/local/bin by using rm -r the deleted files include bash. I have been looking out for solutions, but all of them require bash. Can someone send their copy of Bash (someone who's also using MacOS Mojave) to me? Any version can do. You don't need to send me the bash profile.
Thanks in advance!
(P.S. it isn't in /usr/bin)
Last edited by aliu0130; 05-06-2019 at 06:31 AM.
Reason: added detail
I accidentally deleted most of /usr/local/bin by using rm -r the deleted files include bash. I have been looking out for solutions, but all of them require bash. Can someone send their copy of Bash (someone who's also using MacOS Mojave) to me? Any version can do. You don't need to send me the bash profile.
Thanks in advance!
(P.S. it isn't in /usr/bin)
How about a little information please.
What version of what distribution are you running?
What hardware are you running on?
I think OP is using a Mac and nuked /usr/local/bin. Pretty sure the bash binary on a Mac will not run in Linux but I could be wrong...
Does this MAC distribution not ahve a REPO from which he could re-install bash? (I am not a fruit machine user. The last time I ran an apple it was an Apple-IIe clone called the Franklin Ace 1000!)
Not at all - Macs don't work that way - I believe a reinstall is in order. They are essentially just like windows in that the OS is only available from the install medium. They also aren't Linux based, but some sort of proprietary BSD so pretty sure a bash binary from Linux won't work.
If you're on a Mac you need to re-install the OS. That's how you get it back. It's easy and you won't lose your personal files and preferences.
You really DON'T want someone to just send you the file. That's a big invitation for someone sending you a malicious binary that you will likely never know is a trojan. Just fix it with a re-install.
Afterwards, you might want to consider installing Homebrew (https://brew.sh), which is a full Linux-style package manger for the Mac and get a more recent version of BASH, as well as access to all kinds of other packages for the command line.
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,487
Rep:
MacOS is a version of FreeBSD with the Aqua desktop, if memory serves me right, so it would be a FreeBSD bash that would be required, but as has been said, just re install, we all learned by making mistakes.
So how do I reinstall?
BTW I do have homebrew. I really like everything it offers like cask(though command-not-found didn't work)
If you have a timemachine backup, you can recover from that. If not, you'll have to do a complete OS install from CD or however Apple does it now, maybe from their recovery partition. You will lose all data though. Tons of resources out there on how to do a fresh Mac OS install.
MacOS is a version of FreeBSD with the Aqua desktop, if memory serves me right, so it would be a FreeBSD bash that would be required, but as has been said, just re install, we all learned by making mistakes.
Darwin is based on BSD but that's neither here nor there as that's only a base, with a LOT integrated into it. Like ingredients of a cake, not discrete OS and graphics layers. You can't just "grab a package". Time machine restore of the directory would be the thing, if he had the backups.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.