Shut the front door!
In a lot of situations it's actually bad to use sudo because it can impact settings that make programs or file ownership go to root instead of the user.
Shut the front door!
In a lot of situations it's actually bad to use sudo because it can impact settings that make programs or file ownership go to root instead of the user.
How else will the OS know I'm serious ?
Yeah I only use sudo once, for the su.
β¦ but why? βsudo -iβ is a thing. Why get another program involved?
It's easier to just call su once and run every single command as root rather than having to randomly use sudo for some commands and not for others (/s if it's not obvious)
But you can do that without involving βsuβ.
I don't use sudo.
Ever.
It's disabled by default in slackware, and I don't know why it's even there.
Tell me how you can run rm rf / no preserve root without su, I'm waiting.
Is this some kind of joke going over my head or something?
Run βsudo -iβ then run βrm -rf --no-preserve-rootβ
I've seen that piece, mostly in beginner instructions, for a root shell. But does it even make sense? Why run a elevated su? Just run su.
But rm -fr / * seems not to work for removing the French language pack. Can someone confirm if it works with sudo?
Works fine with sudo, removes all the French bloat.
Ah, I see your problem, you need to add --no-preserve-root.
See the French are super into wine - and grape vines are notoriously hard to get rid of, so if you want to really get rid of the French language pack, you need to rip that grapevine out by the root (e.g. don't preserve the root). Otherwise, the French language pack will just grow back harder and Frenchier than before.
Sacrebleu!
sudon't tell me what to do
IMO the "year of the Linux desktop" will come when distros are designed for people who shouldn't even be allowed to use sudo.
Let me introduce you to atomic distros.
I moved my father on Bluefin 1.5 years ago from his antique MacBook Air. He doesn't know sudo exists. He has never heard of ujust. He doesn't even command line. He hasn't had to do a single update because it all happens in the background. He just.. uses it.
doesn't even have to be atomic, I rescued my wife's shit laptop using Ubuntu Mate (snaps booing in background) and she has never seen the command line unless I open it. It's been like that for over a year at least.
Donβt need sudo if youβre always root.
Now excuse me. I need to call the bank and find out why my checking account is suddenly $0.
I mean, yeah, it's your computer. Just login on the root account, nothing bad ever comes of that, not even once, nope.
Sudo !!
πππ perfection
Pfft. Real men always log in as root.
You got that right. https://www.garyshood.com/root/
sudo bash
ooo what's that one do?
Starts an interactive session as root (or another user when combined with -u)
It provides a login shell - like
su -
So you get the full environment from that user
sudo -i starts a login shell as the specified user. Login shell means it'll read that user's bashrc/zshrc/whatever other login files and apply those. If no user is specified, then it'll login as root, so you get a root shell
Look at OP, claiming to have that mythical girlfriend who will make a sandwich without escalating privileges
All you need is a single sudo su, correct.
It's a nice precautionary measure
It is indeed.
For those unaware: sudo !! if your previous command failed because you forgot sudo.
Let's say I run something like rm a.txt && rm b.txt, will sudo !! work for both commands or just the first?
!! basically pastes the last ... action you took as an interaction with the shell. it's the same as pressing the up arrow, and putting whatever you want in the same position relative to the !!
I wasn't sure, so I tested this. Turns out, only a.txt would be deleted and removal of b.txt fails due to lack of permissions.
!! is pure textual substitution, so it'd be sudo rm a.txt && rm b.txt. You could do something like sudo sh -c "!!" though.
I normally disable root, so I donβt think su would work. Never tried, so maybe I am using it wrong.
top 85 comments