this post was submitted on 26 May 2026
461 points (97.7% liked)

linuxmemes

31571 readers
587 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.
  • 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 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 3 years ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] akunohana@piefed.blahaj.zone 144 points 5 days ago (5 children)
    [–] Obnomus@lemmy.ml 11 points 3 days ago (1 children)
    [–] akunohana@piefed.blahaj.zone 2 points 3 days ago (1 children)

    I approve of the ice to coke ratio. I am now chill.

    [–] Ephera@lemmy.ml 32 points 5 days ago (3 children)

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

    [–] akunohana@piefed.blahaj.zone 60 points 4 days ago* (last edited 4 days ago) (1 children)

    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 12 points 4 days 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_cpp@feddit.it 18 points 4 days ago

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

    [–] Nilz@sopuli.xyz 12 points 4 days ago (1 children)

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

    load more comments (1 replies)
    [–] certified_expert@lemmy.world 2 points 3 days ago (1 children)
    • ctrl + p
    • ctrl + a
    • sudo [space]
    • enter
    [–] Obnomus@lemmy.ml 1 points 2 days ago

    How about just one keyboard shortcut and enter.

    [–] SkaveRat@discuss.tchncs.de 16 points 4 days ago (3 children)

    Ctrl A is easier to reach than the home key

    load more comments (3 replies)
    load more comments (1 replies)
    [–] olafurp@lemmy.world 143 points 5 days ago* (last edited 5 days ago) (16 children)

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

    [–] juipeltje@lemmy.world 77 points 5 days ago

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

    [–] devfuuu@lemmy.world 27 points 5 days ago (12 children)

    Not all shells support that.

    I use fish btw.

    [–] protogen420@lemmy.blahaj.zone 17 points 5 days ago (1 children)

    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

    load more comments (11 replies)
    [–] Sarcasmo220@lemmy.ml 16 points 5 days ago

    I learned something new today!

    load more comments (13 replies)
    [–] ikidd@lemmy.dbzer0.com 73 points 5 days ago (1 children)
    [–] Nilz@sopuli.xyz 38 points 4 days ago (1 children)

    Wait, you don't have The Fuck installed?

    [–] olafurp@lemmy.world 6 points 4 days ago (1 children)

    Waiting for it to be rewritten in rust

    [–] daeraxa@programming.dev 4 points 3 days ago

    Only worth installing if it is πŸ”₯πŸ”₯πŸ”₯blazing⚑⚑⚑fast

    [–] GarboDog@lemmy.world 15 points 4 days ago (1 children)

    Wait… YOU CAN DO THAT?!

    [–] Obnomus@lemmy.ml 6 points 3 days ago (1 children)

    Forgot to mention but only in fish shell.

    load more comments (1 replies)
    [–] thedormantotaku@lemmy.world 3 points 3 days ago (1 children)

    You can do that??

    I always did sudo !!

    [–] Obnomus@lemmy.ml 2 points 2 days ago (2 children)

    Well its only for fish shell.

    [–] x0x7@lemmy.world 1 points 2 days ago* (last edited 2 days ago)

    But in almost any shell there is also ctrl+a sudo. ctrl+s requires you haven't sent it yet.

    Or also up ctrl+a sudo. It's only one more key press than sudo !!, and unlocks ctrl-a. More useful to teach noobs IMO. Teach a skill instead of a quirk.

    [–] thedormantotaku@lemmy.world 1 points 2 days ago (1 children)

    I am using fish shell and just tried it. Thanks man. Such a convenient feature NGL

    [–] Obnomus@lemmy.ml 1 points 2 days ago

    No problem.

    [–] b161@lemmy.blahaj.zone 11 points 4 days ago (3 children)
    load more comments (3 replies)
    [–] nibbler@discuss.tchncs.de 14 points 4 days ago (1 children)

    I used to have an alias 'please' for that.

    load more comments (1 replies)
    [–] imsufferableninja@sh.itjust.works 21 points 5 days ago (1 children)

    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

    load more comments (1 replies)
    [–] albbi@piefed.ca 17 points 5 days ago (2 children)

    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 8 points 4 days ago

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

    load more comments (1 replies)
    load more comments
    view more: next β€Ί