459
Noice (thelemmy.club)
submitted 3 days ago by Obnomus@lemmy.ml to c/linuxmemes@lemmy.world
top 50 comments
sorted by: hot top new old
[-] thedormantotaku@lemmy.world 3 points 1 day ago

You can do that??

I always did sudo !!

[-] Obnomus@lemmy.ml 1 points 21 hours ago

Well its only for fish shell.

[-] x0x7@lemmy.world 1 points 19 hours ago* (last edited 19 hours 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 20 hours ago

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

[-] Obnomus@lemmy.ml 1 points 15 hours ago

No problem.

[-] akunohana@piefed.blahaj.zone 142 points 3 days ago
[-] Obnomus@lemmy.ml 10 points 1 day ago
[-] akunohana@piefed.blahaj.zone 2 points 1 day ago

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

[-] Obnomus@lemmy.ml 2 points 21 hours ago
[-] certified_expert@lemmy.world 2 points 1 day ago
  • ctrl + p
  • ctrl + a
  • sudo [space]
  • enter
[-] Obnomus@lemmy.ml 1 points 21 hours ago

How about just one keyboard shortcut and enter.

[-] a14o@feddit.org 1 points 1 day ago

Start with ctrl+p, ctrl+a but yes

[-] Ephera@lemmy.ml 32 points 3 days ago

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

[-] akunohana@piefed.blahaj.zone 60 points 3 days ago* (last edited 3 days 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 12 points 2 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 3 days ago

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

load more comments (2 replies)
load more comments (4 replies)
[-] olafurp@lemmy.world 141 points 3 days ago* (last edited 3 days ago)

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

[-] juipeltje@lemmy.world 76 points 3 days ago

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

[-] devfuuu@lemmy.world 27 points 3 days ago

Not all shells support that.

I use fish btw.

load more comments (13 replies)
[-] Obnomus@lemmy.ml 1 points 1 day ago
[-] Nalivai@lemmy.world 2 points 1 day ago

What shell are you using? In both bash and zsh, !! is a substitute for a previous command

[-] Obnomus@lemmy.ml 1 points 21 hours ago
[-] Nalivai@lemmy.world 1 points 15 hours ago

Oof. Posix non-compliant stuff always gives me the ick.
I highly recommend switching to zsh, it can do the same stuff and more, and it is actually a proper terminal. Switching scripts might be a bit complicated if you're deep into it, but it's worth it

load more comments (7 replies)
[-] GarboDog@lemmy.world 15 points 2 days ago
[-] Obnomus@lemmy.ml 6 points 1 day ago

Forgot to mention but only in fish shell.

[-] GarboDog@lemmy.world 1 points 1 day ago
[-] basxto@discuss.tchncs.de 1 points 1 day ago

Why do you not press the up arrow + Pos1?

[-] Obnomus@lemmy.ml 1 points 21 hours ago

What is Pos1?

[-] ikidd@lemmy.dbzer0.com 74 points 3 days ago
[-] Nilz@sopuli.xyz 37 points 3 days ago

Wait, you don't have The Fuck installed?

load more comments (2 replies)
[-] b161@lemmy.blahaj.zone 11 points 2 days ago
load more comments (3 replies)
[-] nibbler@discuss.tchncs.de 15 points 2 days ago

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

load more comments (1 replies)
[-] prenatal_confusion@feddit.org 1 points 1 day ago

Fuckit should be able to catch that

load more comments
view more: next ›
this post was submitted on 26 May 2026
459 points (97.9% liked)

linuxmemes

31551 readers
483 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 2 years ago
    MODERATORS