562
submitted 3 weeks ago by azha@lemm.ee to c/linuxmemes@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] Endymion_Mallorn@kbin.melroy.org -3 points 3 weeks ago

Um... shouldn't it be:

sudo su;
apt-get update;
flatpak update;

Or am I missing something?

[-] dunz@feddit.nu 16 points 3 weeks ago* (last edited 3 weeks ago)

Use sudo -i instead, gives you an interactive shell without running the su binary with sudo, which is unnecessary

Edit: it's i not I

[-] Endymion_Mallorn@kbin.melroy.org 2 points 3 weeks ago

Thank you, that's a switch I hadn't looked at. I'll admit though, I'm on Mint, I have a nice built-in GUI that works nicely.

[-] SnotFlickerman@lemmy.blahaj.zone 4 points 3 weeks ago* (last edited 3 weeks ago)

It's a really important switch for doing things like setting up wireguard, which has protected directories, you can't actually enter the directory for wireguard setup without sudo -i

(I mean technically you probably can with sudo su, too, but this is more elegant and less redundant)

[-] dunz@feddit.nu 5 points 3 weeks ago

My phones keyboard decided to capitalize, it's -i

[-] SnotFlickerman@lemmy.blahaj.zone 4 points 3 weeks ago

Thanks, we suffered the same fate.

[-] Geodad@lemm.ee 13 points 3 weeks ago* (last edited 3 weeks ago)

You should never use "sudo su". That's a big security no-no.

~$ sudo apt update

[sudo] password for {your user name}:

-command executes-

~$

[-] Endymion_Mallorn@kbin.melroy.org 1 points 3 weeks ago

Does that1 security no-no matter on a single-user system which (almost) never leaves the sight of said user? Or is that just a matter of 'don't do this on a server'?

[-] Geodad@lemm.ee 4 points 3 weeks ago

It's not a good habit to get into. Even if you don't have anyone at homebto mess with your system, these kinds of habits tend to follow people around. You'll get comfortable at work and run something as root, but forget to deescalate permissions.

Just using sudo as your user runs only that command or script as root, then drops back to your limited user account.

Say you got busy or distracted and walked away, anyone who was able to access your system between the end of the command and the time your system auto locked would only have the access level of your user.

[-] cowfodder@lemmy.world 7 points 3 weeks ago

Sudo apt-get update && sudo apt-get (-y if you want it to do it automatically) upgrade

[-] SnotFlickerman@lemmy.blahaj.zone 5 points 3 weeks ago

There's also

sudo apt update

if you only want to apply the superuser permission one specific command instead of a lot of commands

[-] aleq@lemmy.world 4 points 3 weeks ago

What's the problem exactly? There are many ways to do it, and I think saying you run apt-get update is quite fine even if you're not explicitly saying that you run it as root. And he may not have flatpaks.

this post was submitted on 21 Apr 2025
562 points (97.3% liked)

linuxmemes

24894 readers
990 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. ๐Ÿ‡ฌ๐Ÿ‡ง Language/ัะทั‹ะบ/Sprache
  • This is primarily an English-speaking community. ๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡บ๐Ÿ‡ธ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • ย 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS