LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   URGENT: I destroyed bash (https://www.linuxquestions.org/questions/linux-software-2/urgent-i-destroyed-bash-226453/)

flamesrock 09-04-2004 02:40 AM

URGENT: I destroyed bash
 
Thinking it was a directory, I tried to copy a shell script file to it, so I ended up overwriting /bin/bash. Now what do I do?! I'm lost..I'm afraid to turn off the computer.

-thanks in advance

serz 09-04-2004 03:02 AM

Get the bash package and re-install it.

flamesrock 09-04-2004 01:31 PM

Thanks, but how do I do that? I can't even log in.

david_ross 09-04-2004 01:38 PM

Just boot up with CD1. Mount your existing root partition (assuming it is hda1):
mount /dev/hda1 /mnt

Then copy the bash binary from the CD:
mv /mnt/bin/bash /mnt/bin/bash-script
cp /bin/bash /mnt/bin/

flamesrock 09-04-2004 02:01 PM

thanks! that did the trick.


All times are GMT -5. The time now is 09:00 PM.