Yes, Ctrl-C terminates console programs so isn't appropriate for copying text. That's why Macs use Command-C instead. It's somewhat annoying when you're switching from Windows to Mac, but when you're focused in on Mac work, it's so nice that the same method works everywhere. I believe the Enter on a Windows command session actually only works if you've got Quick Edit enabled. Otherwise, you have to choose Mark and Copy from the menu. The problem with Quick Edit is that if you highlight text in the command window and leave it highlighted, the process producing that output can often block waiting for you to press Enter.
So, you want to know why. Ofcourse all of this is for historical reasons, because somebody long ago invented that Ctrl-C should be used to stop programs, and later somebody else thought it was a good idea to use Ctrl-X, -C, -V for cut, copy and paste.
Ctrl-C was one of a handful of keyboard sequences chosen by the program designers at Xerox PARC to control text editing, with Ctrl-Z (Undo), Ctrl-X (Cut), Ctrl-V (Paste), and Ctrl-P (Print). The first four letters are all located together at the left end of the bottom row of the standard QWERTY keyboard, and P towards the upper right. The equivalent key combination on Mac OS computers is Command-C.
In command-line environments
Control-C as an abort command was popularized by TOPS-20 and TOPS-10 and adopted to other systems including Unix, and Digital Equipment operating systems from which it was copied to CP/M and thus to MS-DOS and Microsoft Windows. In POSIX systems, the sequence causes the active program to receive a SIGINT signal. If the program does not specify how to handle this condition, it is terminated. Typically a program which does handle a SIGINT will still terminate itself, or at least terminate the task running inside it.
The Wikipedia entry is mostly right. I don't know if ^c predated TOPS-10 (the first OS that ran on PDP-10 hardware), but it was there when I started using Tops-10. And Tops-20 included it. So then VMS (the Vax OS) included it, as did several other DEC operating systems such as RSX-11.
RSX-11 was created by a team that included David Cutler, who did early VMS work (since VMS was based on RSX-11. And then Cutler moved to Microsoft and was the father of Windows NT. Early NT designs did not include any GUI, so there was no problem.
Early Unix systems ran on DEC hardware, and so they followed the tradition and used ^c to stop programs.
Its not accurate to say that ^c is copy in Linux, as it varies, sometimes its ^c, sometimes ^-shift-C and sometimes one of the hotkeys over on the ten key pad (which never has just 10 keys).
Stephan van Hulst
Joined: Sep 20, 2010
Jayesh A Lalwani wrote:Yeah I don't know why they didn't do it like Linux:- Selecting some text = copy. Why make users press a button?
I know I would be very unhappy if I lost my clipboard every time I accidentally selected something.