This example showed pasting into the same terminal window, but you can use this right-click technique to paste into different terminal windows. When they hit Enter, they are moved to the directory. The user missed the “~/” from the start of the path. They’ve typed the “~/” and then copied the remainder of the path from their previous attempt and pasted it into their second command line. The text is pasted at the position of the cursor on the command line. In this example, the relative path has been given incorrectly, and Bash cannot change directory. To paste the copied text, right-click with the mouse once more and select “Paste” from the context menu. Once you have highlighted some text, right-click with the mouse and select “Copy” from the context menu. You have to use the mouse to highlight the text you’re going to copy, so why not use it to perform the copy and paste actions? You can use the mouse to copy and paste in a terminal window. The caveat here is that these can only be used within the same terminal window. The key combination Ctrl+Insert is the same as Ctrl+Shift+C, and the combination Shift+Insert is the same as Ctrl+Shift+V. You can highlight text in gedit and hit Ctrl+C, and then paste it into a terminal window using Ctrl+Shift+V. But note, when you’re pasting into an application-and not into a terminal window-you must use Ctrl+V.Īnd you can go the other way too. You can also paste into a graphical application such as gedit. You can use Ctrl+Shift+V to paste the copied text into the same terminal window, or into another terminal window. If you highlight text in the terminal window with your mouse and hit Ctrl+Shift+C you’ll copy that text into a clipboard buffer.
RELATED: How to Be More Productive in Ubuntu Using Keyboard Shortcuts Ctrl+Shift+C and Ctrl+Shift+VĮasily remembered because they are very similar to their counterparts, Ctrl+Shift+C and Ctrl+Shift+V are direct replacements for Ctrl+C and Ctrl+V.
So, plainly we can’t expect Ctrl+C and Ctrl+V to perform copying and pasting text when they already have time-honored functions allocated to them. Does that mean we can enter Enter by typing Ctrl+M? Try it in a terminal window. So Ctrl+M probably means the same as Enter. We saw earlier that Ctrl+C showed up as ^C. The Bash shell is a program running in that emulated TTY.Īs a quick aside, you may notice that Enter is represented by ^M. Note that it is the terminal window that is the emulation. Because a terminal window is an emulated TTY, that keystroke combination (and many others) have been preserved and replicated in the emulation. That signal is SIGINT, which tells the current process to terminate. When a TTY was a physical device, Ctrl+C was chosen as a handy key combination to generate a signal. In fact, those keystrokes were recruited a long time before graphical shells were invented, back when a teletype (TTY) was a physical thing. Ctrl+C and Ctrl+V were allocated functions long before copying and pasting were ever thought of. Once our newcomer opens a terminal window and tries to copy and paste at the Bash shell command prompt, that all changes. They use the keystrokes from muscle memory and get on with their work. Ctrl+C copies highlighted text and Ctrl+V pastes it at the cursor. Our newcomer to Linux probably doesn’t even think about the fact that these conventions have been carried through to these applications. Those very same keystrokes work in most Linux graphical applications, such as the editor gedit or the LibreOffice office suite. They follow the same convention of C to copy and V to insert. In macOS, you use Command+C to copy it and Command+V to paste it. In Windows, you use Ctrl+C to copy a section of highlighted text and Ctrl+V to paste it.
When people use a Linux computer for the first few times, whether they come from the Windows or the macOS worlds, they are often confounded when trying to copy and paste within a terminal window. Copying and pasting text is a staple part of using a computer.