Content Warning

CONTENT WARNING

You may view NSFW content!

If you are under 18 years old you are not allowed to continue!

Lemmy.NRDBLG.de
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
obnomus@lemmy.ml to linuxmemes@lemmy.worldEnglish · 1 day ago

Noice

lemmy.ml

message-square
71
link
fedilink
382

Noice

lemmy.ml

obnomus@lemmy.ml to linuxmemes@lemmy.worldEnglish · 1 day ago
message-square
71
link
fedilink
alert-triangle
You must log in or # to comment.
  • GarboDog@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    3 hours ago

    Wait… YOU CAN DO THAT?!

  • b161@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    7
    ·
    6 hours ago

    sudo !!

  • wpb@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    5 hours ago

    <Esc> k I sudo <Space> <Enter>

  • jenesaisquoi@feddit.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 hours ago

    lol no vi mode

  • BetaSoldier@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    6 hours ago

    deleted by creator

  • nibbler@discuss.tchncs.de
    link
    fedilink
    arrow-up
    8
    ·
    12 hours ago

    I used to have an alias ‘please’ for that.

  • printf("%s", name);@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    116
    ·
    23 hours ago

    MaNLkfuwl4LB6ck.jpg

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      27
      ·
      22 hours ago

      Always amused me that sudo !! is actually more keypresses (at least on keyboards where typing ! requires holding Shift).

      • printf("%s", name);@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        50
        ·
        22 hours ago

        You just blew my mind. sudo [space] [shift] !! [enter] (4+1+1+1+1+1) is one keypress longer than ↑ + home + sudo + space + enter (1+1+4+1+1). In your face, universe.

        • Logi@lemmy.world
          link
          fedilink
          arrow-up
          9
          ·
          13 hours ago

          If you have an actual home key. If it’s ctrl+a or (IIRC, AFK) ctrl+← then we’re even.

          And if we track hand movements then pressing ! twice may be faster than moving to another key.

          But yeah, it’s not at all clear that sudo !! is faster like you’d expect it to be.

      • Axolotl@feddit.it
        link
        fedilink
        arrow-up
        9
        ·
        21 hours ago

        But it’s faster since your hand move less and you can keep shift pressed

      • Nilz@sopuli.xyz
        link
        fedilink
        arrow-up
        11
        ·
        22 hours ago

        I use zsh with the sudo plugin. Double tap esc and your current or last command will be prefixed with sudo.

        • printf("%s", name);@piefed.blahaj.zone
          link
          fedilink
          English
          arrow-up
          8
          ·
          22 hours ago

          I don’t dabble in black magic. /j

          It’s actually pretty neat.

    • SkaveRat@discuss.tchncs.de
      link
      fedilink
      arrow-up
      14
      ·
      22 hours ago

      Ctrl A is easier to reach than the home key

      • ClownStatue@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        15 hours ago

        Unless you’re in a default screen session (I always thought ^A was such a dumb default for screen to use).

        • AnUnusualRelic@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          4 hours ago

          Screen must have been written by someone who wasn’t familiar with the shell. It’s the only logical explanation.

          • ClownStatue@piefed.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            3 hours ago

            Maybe someone who only used csh? I can’t remember if ^a is a default in that shell. I thought it started with ksh or bash.

            ETA: just looked it up and I’m dumb. Comes from emacs (of course) and looks like it was introduced in bash. I guess I could claim ignorance, being a VI man, but I actually knew at some point that it came from emacs. I think I can count on 1 hand the number of times I’ve used emacs

  • Caveman@lemmy.world
    link
    fedilink
    arrow-up
    130
    ·
    1 day ago

    You can also just do a sudo !! the !! is a shorthand for whatever you tried to run previously.

    • lefixxx@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      5 hours ago

      wish i could alias that

      alias ffs=“sudo !!”

      • timbuck2themoon@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        59 minutes ago

        alias ffs='sudo $(history -p !!)'

      • Caveman@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        That doesn’t work? I would have thought it would work.

        • lefixxx@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          5 hours ago

          !! Gets replaced by whatever was run before the alias command

    • juipeltje@lemmy.world
      link
      fedilink
      arrow-up
      65
      ·
      1 day ago

      Was about to say, why would you copy anything when using sudo !! lol

    • devfuuu@lemmy.world
      link
      fedilink
      arrow-up
      23
      ·
      1 day ago

      Not all shells support that.

      I use fish btw.

      • guymontag@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        8 hours ago

        Holy shit I wish fish supported it. I just press up arrow then hold left arrow and manually type sudo. It fucking sucks

        • devfuuu@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 hours ago

          I’ve used it for so many years that it’s not an issue anymore. I remember using !! a lot but it was literally just for sudo. Now i either write what I need and do up or write what I need and then press alt+s, which seems even more intuitive now.

        • eneff@discuss.tchncs.de
          link
          fedilink
          arrow-up
          4
          ·
          6 hours ago

          … are you not aware of Alt+S?!

        • BolshoyToster@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          7 hours ago

          Does your keyboard not have a home key?

      • furry toaster@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        15
        ·
        1 day ago

        I made my own !!

        • ArchAengelus@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          14
          ·
          24 hours ago

          I know what you meant (I have one for fish as well), but I chucked because you looked very enthusiastic about it!

          The fish function for !! is super useful though

      • NannerBanner@literature.cafe
        link
        fedilink
        arrow-up
        6
        ·
        1 day ago

        I don’t even know what I use anymore. My distro seems to keep changing it when I reinstall.

        • unbuckled_easily933@lemmy.ml
          link
          fedilink
          English
          arrow-up
          8
          ·
          22 hours ago
          echo $SHELL
          
          • NannerBanner@literature.cafe
            link
            fedilink
            arrow-up
            4
            ·
            13 hours ago

            Lol, thanks. Now I know.

    • Sarcasmo220@lemmy.ml
      link
      fedilink
      arrow-up
      15
      ·
      23 hours ago

      I learned something new today!

    • adeoxymus@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      1 day ago

      I completely forgot about this one!

  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    2
    ·
    12 hours ago

    oh my zsh plugin just let’s you press esc twice :3

  • ikidd@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    73
    ·
    1 day ago

    alias fuck="sudo !!"

    • Nilz@sopuli.xyz
      link
      fedilink
      arrow-up
      34
      ·
      22 hours ago

      Wait, you don’t have The Fuck installed?

      • Caveman@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        5 hours ago

        Waiting for it to be rewritten in rust

  • Albbi@piefed.ca
    link
    fedilink
    English
    arrow-up
    14
    ·
    23 hours ago

    I know alt +. inserts the last argument of previous commands. There must be a good list of alt commands somewhere because they’re pretty damn useful.

    • softwarist@programming.dev
      link
      fedilink
      English
      arrow-up
      6
      ·
      13 hours ago

      The manual is a good place to start. It’s just GNU Readline under the hood.

  • insufferableninja@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    20
    ·
    1 day ago

    Top text should maybe say copying by, rather than copying then? Since sudo !! will automatically copy the previous command with sudo in front of it, so there’s no manual copying involved

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 day ago

      Yeah I remembered that after uploading the meme.

  • RedstoneValley@sh.itjust.works
    link
    fedilink
    arrow-up
    9
    ·
    1 day ago

    Or press Ctrl-S and take a nice walk outside

  • TrickDacy@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    1 day ago

    Cannot find any reference online. What is this supposed to do? Not at a PC right now.

    • yeehaw@lemmy.ca
      link
      fedilink
      arrow-up
      8
      ·
      1 day ago

      !! Just puts in your last typed command. So if you typed rm -rf /etc, you wouldn’t have permission. But if you typed in sudo !! Right after, then you’re really fucked.

      • TrickDacy@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        1 day ago

        Ah I wasn’t clear – those, I knew. It’s alt+S I don’t know. I’m at my machine now and it doesn’t seem to do anything on Pop_OS.

        • clif@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          21 hours ago

          Seem to be a fish shell thing.

          I tested on my good ole trusty bash and got nothing so I went searching.

          EDIT: Clarification : alt+s seems to be a fish shell thing.

        • yeehaw@lemmy.ca
          link
          fedilink
          arrow-up
          3
          ·
          22 hours ago

          Ya I haven’t tried alt s. Never heard of it before either.

      • softotteep@pawb.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        19 hours ago

        But if you typed in sudo !! Right after, then you’re really fucked.

        Not if you don’t type your password.

        • ClownStatue@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          15 hours ago

          Adding to this, if you notice numbers next to your previous commands when you run history, you can do !<number> and it will rerun that command. Probably the second cool shell trick I learned back in the olden days or yore (mid-90s?) after ⬆️

          • moopet@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 hours ago

            ctrl-r is generally quicker

            • ClownStatue@piefed.social
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 hours ago

              Learned that one embarrassingly much later.

        • yeehaw@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          17 hours ago

          I assume if you are silly enough to type in rm -rf /etc, then you are silly enough to type in your password 😅

  • eco_game@discuss.tchncs.de
    link
    fedilink
    arrow-up
    8
    ·
    1 day ago

    On my Terminal that just makes it so I can’t type anymore, I feel like I’m doing something wrong…

    My solution to the problem is CTRL+U, type sudo, CTRL+Y.

    • insufferableninja@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      14
      ·
      1 day ago

      If you hit ctrl-s, ctrl-q will unfreeze

      • eco_game@discuss.tchncs.de
        link
        fedilink
        arrow-up
        4
        ·
        1 day ago

        Interesting, why is that? Like what feature is that?

        • Ephera@lemmy.ml
          link
          fedilink
          arrow-up
          7
          ·
          edit-2
          22 hours ago

          Same reason there’s a ScrollLock key on keyboards. Didn’t always have scrollbars and if the application prints more than you can read, you want to pause that…

          • softotteep@pawb.social
            link
            fedilink
            English
            arrow-up
            10
            ·
            19 hours ago

            THAT’S WHAT IT’S FOR??

            Now that I think about it, it does seem pretty obvious.

        • neclimdul@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          23 hours ago

          Short answer, terminals are built on the same technology as physical terminals from the 60s and 70s when controlling the flow of data from the server was a more useful feature.

        • insufferableninja@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          4
          ·
          23 hours ago

          It’s part of the terminal emulator flow control

      • qprimed@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        x👏off👏… x👏on👏… x👏off👏, x👏on👏…flowcontrol.

    • dracc@discuss.tchncs.de
      link
      fedilink
      arrow-up
      8
      ·
      1 day ago

      Ctrl + S freezes your shell yes. But Alt + S?

      • eco_game@discuss.tchncs.de
        link
        fedilink
        arrow-up
        5
        ·
        1 day ago

        Ah indeed, ALT+S does nothing. I must have pressed both before realizing it was frozen.

    • Dionysus@leminal.space
      link
      fedilink
      arrow-up
      8
      ·
      1 day ago

      Need to use the fish shell instead of the others for this to work. (May be a way to enable it in other shells but I’m not sure how)

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
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.
  • Don’t come looking for advice, this is not the right community.
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 figures

We 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.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 767 users / day
  • 1.16K users / week
  • 6.23K users / month
  • 6.84K users / 6 months
  • 1 local subscriber
  • 31.5K subscribers
  • 343 Posts
  • 2.75K Comments
  • Modlog
  • mods:
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.17
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org