PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
No Result
View All Result
Home Linux

How to Copy Paste in Terminal in Ubuntu and Other Linux

September 4, 2020
in Linux
283 9
How to Copy Paste in Terminal in Ubuntu and Other Linux


I have been using Linux for a decade now and this is why sometimes I take things for granted.

Copy pasting in the Linux terminal is one of such things.

I thought everyone already knew this until one of the It’s FOSS readers asked me this question. I gave the following suggestion to the Ubuntu user:

Use Ctrl+Shift+C for copying and Ctrl+Shift+V for pasting text in the terminal in Ubuntu. Right click and selecting the copy/paste option from the context menu is also an option.

I thought of elaborating on this topic specially when there is no single universal way of copy and paste in the Linux terminal.

How to copy paste text and commands in the Linux terminal

There are several ways to do this.

Method 1: Using keyboard shortcuts for copy pasting in the terminal

On Ubuntu and many other Linux distributions, you can use Ctrl+shift+C for copying text and Ctrl+shift+V for pasting text in the terminal.

The copy pasting also works for the external sources. If you copy a command example from It’s FOSS website (using the generic Ctrl+C keys), you can paste this command into the terminal using the Ctrl+Shift+V into the terminal.

Similarly, you can use Ctrl+shift+C to copy text from the terminal and then use it to paste in a text editor or web browser using the regular Ctrl+V shortcut.

Basically, when you are interacting with the Linux terminal, you use the Ctrl+Shift+C/V for copy-pasting.

Method 2: Using right click context menu for copy pasting in the terminal

Another way of copying and pasting in the terminal is by using the right click context menu.

Select the text in the terminal, right click and select Copy. Similarly, to paste the selected text, right click and select Paste.

Method 3: Using mouse to copy paste in Linux terminal

Another way to copy paste in Linux terminal is by using only the mouse.

You can select the text you want to copy and then press the middle mouse button (scrolling wheel) to paste the copied text.

Please keep in mind that these methods may not work in all the Linux distributions for a specific reason that I explain in the next section.

There is no universal key shortcuts for copy paste in the Linux terminal. Here’s why!

The keybindings for copy-pasting are dependent on the terminal emulator (commonly known as terminal) you are using.

If you didn’t know that already terminal is just an application and you can install other terminals like Guake or Terminator.

Different terminal applications may have their own keybindings for copying and pasting like Alt+C/V or Ctrl+Alt+C/V.

Most Linux terminals use the Ctrl+Shift+C/V keys but if it doesn’t work for you, you may try other key combinations or configure the keys from the preferences of the terminal emulator.

If you use Putty on Linux or Windows, it uses an entire different keybindings. In Putty, selecting a text automatically copies it and you can paste it using right click.

Why Linux terminals do not use the ‘universal’ Ctrl+C and Ctrl+V for

No Linux terminal will give you Ctrl+C for copying the text. This is because by default Ctrl+C keybinding is used for sending an interrupt signal to the command running in foreground. This usually stops the running command.

Using Ctrl+C stops a running command in Linux terminal

This behavior has been existing long before Ctrl+C and Ctrl+V started being used for copy-pasting text.

Since the Ctrl+C keys are ‘reserved’ for stopping a command, it cannot be used for copying.

Used Ctrl+S and hanged the terminal?

Most of us use Ctrl+S keys to save changes made to text, images etc. This key is almost universal for saving same as Ctrl+C is for copying.
However, if you enter Ctrl+S in Linux terminal, it will freeze the terminal. No need to close the terminal and start it again. You can use Ctrl+Q to unfreeze the terminal.
Ctrl+S and Ctrl+Q are shortcut keys for flow control.

I know this is elementary for the Sherlock Holmes of the Linux world but it could still be useful to the Watsons.

New or not, you may always use shortcuts in Linux terminal to make your life easier.

Like what you read? Please share it with others.



Source link

Share219Tweet137Share55Pin49

Related Posts

How to Delete Partitions in Linux [Using fdisk and GParted]
Linux

How to Delete Partitions in Linux [Using fdisk and GParted]

Managing partitions is serious business, especially when you have to remove them. I find myself doing this frequently, especially...

April 20, 2021
Blanket: Ambient Noise App With Variety of Sounds to Stay Focused
Linux

Blanket: Ambient Noise App With Variety of Sounds to Stay Focused

Brief: An open-source ambient noise player offering a variety of sounds to help you focus or fall asleep.With the...

April 19, 2021
How to Deploy Seafile Server with Docker
Linux

How to Deploy Seafile Server with Docker

First off, what is Seafile? Seafile is a self-hosted file synchronization program that works with the server-client model, as...

April 18, 2021
Systemd-Free Arch With Linux-libre Kernel
Linux

Systemd-Free Arch With Linux-libre Kernel

In the last month of 2019, the Hyperbola project took a major decision of ditching Linux in favor of...

April 17, 2021
Next Post
Building A Component Library With React And Emotion — Smashing Magazine

Building A Component Library With React And Emotion — Smashing Magazine

Power data analytics, monitoring, and search use cases with the Open Distro for Elasticsearch SQL Engine on Amazon ES : idk.dev

Power data analytics, monitoring, and search use cases with the Open Distro for Elasticsearch SQL Engine on Amazon ES : idk.dev

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Applying DevSecOps to your software supply chain

Applying DevSecOps to your software supply chain

December 3, 2020
Customize media notifications and playback controls with the Media Session API

Customize media notifications and playback controls with the Media Session API

May 27, 2020
Friendly Prefix IDs for Eloquent Models

Friendly Prefix IDs for Eloquent Models

March 9, 2021
How to Make an Area Chart With CSS

How to Make an Area Chart With CSS

December 2, 2020

Categories

  • AWS
  • Big Data
  • Database
  • DevOps
  • IoT
  • Linux
  • Web Dev
No Result
View All Result
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In