Help! I Accidentally Deleted Key System Files on My Linux Machine

0
9
Asked By TechieTurtle93 On

I was trying to manage some directories on my Linux system and accidentally moved to the `/usr` directory. Then, I removed a folder I mistakenly created called `/usr/usr`. Now, I can't boot into recovery mode; it just leads to a black screen or old screenshots. When trying to log in through tty2 or tty3, I get a login prompt, but I'm not able to enter my password. My system is a ThinkPad X13 Gen 2 running Omarchy. Is there an issue with tty that's preventing me from logging in, and is it possible to rebuild Hyprland using a screenshot? Any help would be appreciated!

5 Answers

Answered By HelpfulHiker42 On

You're not alone in this! First off, boot using a live USB to access your drives. From there, see if you can use a Btrfs snapshot to roll back to a time before you accidentally deleted those files. Just make sure to mount your drives manually, and you should be golden!

KindKarma88 -

Totally agree! The Linux community should focus more on helping each other through mess-ups instead of being harsh about mistakes. We're all learning here!

Answered By CuriousCoder12 On

I think the issue was just a simple command error. It happens. Just remember to be cautious when handling system directories. Boot from your USB and check what files you may have removed.

Answered By TechWizard99 On

It sounds like you could have deleted more than intended. Make sure you're clear about the paths you're dealing with—commands can be powerful and dangerous in the `/usr` directory! Check out chroot if you need further recovery options.

Answered By SystemSage77 On

Honestly, creating or modifying system directories isn't the safest move unless you're very sure about what you're doing. You'll want to boot from a USB drive with your live media to inspect and fix things from there without risking more damage.

Answered By WiseOwl22 On

It's likely that you ran `rm -r /usr` instead of the intended `rm -r /usr/usr`. Always double-check before running such commands! Fixing it from a live USB is your best bet now.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.