luckily my login shell is zsh so i can still use the system, and i can still use most of manjaros features and apps, but pacman is’nt working, and neither is yay on snapd. How do get /bin/bash back? will i have to compile it from source or something
this got way more traction than i was expecting, and it is very embarrasing lmao! thanks for everyone who helped solve-!
the solution was
(look in the pacman cache to see if the package containing bash is still present)
`ls -al /var/cache/pacman/pkg/bash*.zst
(then use this to unpack the archive) tar -xzf /var/cache/pacman/pkg/bash-5.2.026-2-x86_64.pkg.tar.zst
thank you to Nachlese for helping me, and giving me the solution i ended up using,
even though it was supposed to be as easy as “sudo pacman -S bash”
/usr/bin ls -al /var/cache/pacman/pkg/bash*.zst
-rw-r–r-- 1 root root 2364392 Jan 23 23:27 /var/cache/pacman/pkg/bash-5.2.026-2-x86_64.pkg.tar.zst
/usr/bin tar -xvf bash-5.2.026-2-x86_64.pkg.tar.zst
tar: bash-5.2.026-2-x86_64.pkg.tar.zst: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
funnily enough, i think unpacking bash may rely on bash
thanks for helping thoughh!
Use a zsh shell, perhaps; though from your description you have done more than delete /bin/bash – How did you delete it?
zsh
sudo pacman -R bash
sudo pacman -S bash
Pacman does not rely on bash.
A possible workaround is to install a Terminal emulator that defaults to zsh, via Pamac-Manager (GUI) (Add/Remove Software), and then perform the previous pacman commands.
Yakuaka comes to mind, if you’re using KDE.
You don’t need to be sosmorttt to follow the logic.
and when i deleted it i was trying to delete /usr/bin/ssh because i don’t really have any use for ssh, but out of habit, after typing /bin i switched around ssh and bash
no.
You have the file - but the command to unpack it was without the full path.
Think!
tar -xzf /var/cache/pacman/pkg/bash-5.2.026-2-x86_64.pkg.tar.zst
for example - then you’ll find your bash in /var/cache/pacman/pkg/usr/bin/bash
the command will unpack the file into the current directory - be aware which directory you are in when you run it
I’d copy it to a directory in my $HOME and then unpack it there.
The easiest way is: cd / tar -xzf /var/cache/pacman/pkg/bash-5.2.026-2-x86_64.pkg.tar.zst
but this will then replace a lot more, not just /usr/bin/bash
The other possibility is: boot from USB and do it using the tools you know - the graphical file manager
I sometimes wonder how such people survive in real life.
“I do not know what this wire in the engine bay of my car does, i “do not use it”…let’s cut it out! Probably not important…”