Skip to content

Instantly share code, notes, and snippets.

@aenriii
Created November 16, 2021 23:54
Show Gist options
  • Save aenriii/c43e665c58b28691f9ec6905181b3654 to your computer and use it in GitHub Desktop.
Save aenriii/c43e665c58b28691f9ec6905181b3654 to your computer and use it in GitHub Desktop.
"i just did sudo chown -R user /! how do i undo this!" arch version

Welcome

if you made the same stupid mistake as me and did sudo chown -R user / and want to fix it without reinstalling, oh boy do i have the good news for you.

first, get into a tty (Ctrl + Alt + F{number of tty, try using 2}) and log in using the root account. If you don't have a root account then youre dead lmao

Now do chown /bin/sudo && chmod 4755 /bin/sudo

now do pacman -Qqn | pacman -S - and accept the installation.

this will reinstall ALL packages, aand should keep MOST of your config. afterwards, run this command, replacing "user" with your username

chown user -R /home/user

reboot and your issue should be mostly fixed, if you need ethernet support just fix that seperately

@BackslashG
Copy link

Uh Oh! 😳 It's Edge O'clock! 😂😂😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment