• rem26_art@fedia.io
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      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

      • B-TR3E@feddit.org
        link
        fedilink
        arrow-up
        2
        arrow-down
        4
        ·
        2 days ago

        OMG. There’s literally more ignorance and bullshit than words in that sentence. It is so wrong that not even the opposite is true. I hope that was sarcasm - in which case I draw my hat because it would be a true peace of art.
        Before voting me down, be sure to

        man environ
        
        • and be sure you’ve understood at least what the environment variables do. If that is too hard for you, at least find out what the difference between a binary and a UID might be.
        • B-TR3E@feddit.org
          link
          fedilink
          arrow-up
          2
          ·
          2 days ago

          No arguments, just downvotes… I almost suspect some participants do not even understand what might be wrong with “you are sudo”? I also bet you don’t have the right idea what the difference between effective UIDs might be depending if you’re using “su”, “su -i” , "su - " sudo or “sudo su”. The differences are not exactly subtile and I dare to say admins on unixoids who don’t know them are basically talking heads without an idea what they’re actually talking about.

          • sem@piefed.blahaj.zone
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 days ago

            I have no idea how any of this is different. Sudo does things as root. Sudo -i logs you in as root where you can do things. So if there is a difference it is v subtle.