262
submitted 2 days ago by markstos@lemmy.world to c/linux@lemmy.ml
top 50 comments
sorted by: hot top controversial new old
[-] Nibodhika@lemmy.world 2 points 4 hours ago

sigh can't believe that no one mentioned that there is a default set of shortcuts that are used across all GNU programs, and it's been the default since way before Ctrl+C/Ctrl+V existed. You can easily copy/paste stuff in any terminal using the same keypresses you would on Emacs, I.e. Ctrl+space to start selection, Alt+W to copy and Ctrl+Y to paste. In fact you can navigate the entire line the same way, not just copy/pasting but moving back and forward, selecting and deleting stuff, e.g. Ctrl+A Ctrl+K cuts the entire line.

Unless you activate Vi mode (which most terminals support) and then you can use the same keypresses you would on Vi, including ci" and other cool stuff that's much more powerful that simple copy/paste.

There is a default, it's just not the same as word uses.

[-] HiddenLayer555@lemmy.ml 10 points 12 hours ago

Centre click is a godsend though. I recently had to start using Windows again and I keep instinctively hitting it.

[-] Zeoic@lemmy.world 1 points 5 hours ago

One of the first things I had to disable when I switched to linux lol Middle click has so many other uses in windows that made it sooo jarring. Ctrl c and crtl v are good enough for me. (Or shift in terminals)

[-] brax@sh.itjust.works 2 points 2 hours ago

Middle-click often works when ctrl+c/ctrl+v won't. It's also a separate buffer giving you the ability to have two different things copy/paste-able

[-] hexagonwin@lemmy.sdf.org 14 points 1 day ago

selection autocopy and wheel/shift ins pasting is superior to all alternatives imo

[-] piefood@feddit.online 2 points 8 hours ago

I love it when I have a mouse. It's terrible on modern touchpads though :(

[-] hexagonwin@lemmy.sdf.org 2 points 5 hours ago

fully agree. i usually sacrifice one of my less used keys and bind it as a left mouse click instead.

[-] daggermoon@lemmy.world 20 points 1 day ago

Holy fucking shit. I just realized that's why Ctrl + C and Ctrl + V don't work in Micro. This has been eye opening.

[-] lefixxx@lemmy.world 4 points 14 hours ago

I have been trying to bind ctrl c to copy in micro and alacrity, I can't find a way.

[-] daggermoon@lemmy.world 2 points 13 hours ago

Always a pleasure to meet another Micro user.

[-] spv@lemmy.spv.sh 2 points 1 day ago

weird -- they work for me. ctrl+c sends SIGINT, and ctrl+v iirc isn't treated specially. i figured sending SIGINT with kill would then preform a copy, but it doesn't. fuck. now i have another puzzle...

[-] JoYo@lemmy.ml 1 points 1 day ago
[-] yesman@lemmy.world 88 points 2 days ago

There is an unintended benefit to putting an obstacle between people who don't know how to use the terminal and pasting code into it.

[-] pmk@lemmy.sdf.org 23 points 2 days ago

Expanding on this, we could make it so that root must use ed(1) to edit files?

[-] spv@lemmy.spv.sh 1 points 1 hour ago

you're evil. i love it.

load more comments (3 replies)
[-] markstos@lemmy.world 19 points 1 day ago

My patch to add Copy/Paste keycode support to the Cosmic Terminal was merged!

https://github.com/pop-os/cosmic-term/pull/481

load more comments (2 replies)
[-] HelloRoot@lemy.lol 18 points 1 day ago* (last edited 1 day ago)

I've been using ctrl+c for copy and ctrl+v for paste for over a decade in my linux terminal by remapping the interrupt to ctrl+x.

It's basic ergonomics and user friendliness.

I do it on all my personal devices and servers.

Nothing bad happened in those ~15 years that I've been doing that. What the fuck are you arguing about?

load more comments (8 replies)
[-] crimsoncobalt@lemmy.world 40 points 2 days ago

Control+C is used to kill a process in the terminal and that shouldn't be overwritten. If it is, you'd have to create a totally separate key binding to kill a process. Seems unnecessarily complex when Control+Shift+C works just fine.

[-] hallettj@leminal.space 46 points 2 days ago

The article doesn't suggest using Control+C. It talks about dedicated copy and paste key codes, and you can program your keyboard to map those codes to whatever keys you like. They suggest Fn+C.

[-] catloaf@lemm.ee 50 points 2 days ago
[-] Damage@feddit.it 9 points 1 day ago

Holy shit can you guys read the article please? It's an existing standard and a dedicated keycode

load more comments (1 replies)
load more comments (7 replies)
[-] Overspark@feddit.nl 14 points 1 day ago

Kitty has a setting that makes Ctrl-C copy text, but only if you've selected something. If you haven't it does a regular break. Best of both worlds!

load more comments (2 replies)
load more comments (9 replies)
[-] ShittyBeatlesFCPres@lemmy.world 19 points 2 days ago

Honestly, this is a nice feature of macOS (or at least iTerm 2; I don’t use the official terminal). I know CTRL-C is used to kill processes and we all have that muscle memory but I usually try to change that on my personal Linux installs because I’ve hit it by mistake before.

I used to use CTRL+INSERT for copy and SHIFT+INSERT for paste but there’s usually no insert key on laptops or even small keyboards. It’s probably time to just adapt.

load more comments (5 replies)
load more comments
view more: next ›
this post was submitted on 08 May 2025
262 points (96.8% liked)

Linux

54046 readers
1251 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS