Score:1

Accidently renamed the ld-linux-aarch64.so.1

il flag

On my Ubuntu command line system, I accidentally renamed the /lib/ld-linux-aarch64.so.1 file. This led to behavior that I cannot use any bash/dash/sh commands and cannot use mv any more to revert the file name. There are not many commands that I can execute and passing /bin/bash or /bin/dash as command is also not working and keeps saying: -bash: /bin/dash: No such file or directory, -bash: /bin/ls: No such file or directory.

Is there any way to get out of this state and recover?

ru flag
Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/127578/discussion-on-question-by-ubuntuissues-accidently-renamed-the-ld-linux-aarch64-s).
Score:2
cn flag

This is done on 20.04.2 LTS (Focal Fossa). On the grub menu, you press 'c' to bring up a grub> prompt.

grub> linux /boot/vmlinuz
grub> initrd /boot/initrd.img
grub> boot

This will boot into an initramfs (busybox) shell:

(initramfs) mkdir /mnt
(initramfs) mount /dev/sda1 /mnt
(initramfs) cd /mnt/lib/x86_64-linux-gnu
(initramfs) ls ld-*
ld-renamed.so*
(initramfs) # Your ld.so version may differ
(initramfs) # (bionic 18.04 is ld-2.27.so)
(initramfs) cp -i -a ld-renamed.so ld-2.31.so
(initramfs) ln -s ld-2.31.so ld-linux-x86-64.so.2
(initramfs) ls -F ld-*
ld-linux-x86-64.so.2@  ld-2.31.so*
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.