{"id":5290,"date":"2021-03-23T07:45:39","date_gmt":"2021-03-23T07:45:39","guid":{"rendered":"https:\/\/linuxways.net\/?p=5290"},"modified":"2021-03-23T07:45:39","modified_gmt":"2021-03-23T07:45:39","slug":"how-to-copy-and-paste-text-in-the-linux-terminal","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-copy-and-paste-text-in-the-linux-terminal\/","title":{"rendered":"How to Copy and Paste Text in the Linux Terminal"},"content":{"rendered":"<p>Sometimes while working in the Linux command line, you need to type the long commands or texts you found in the file or on the internet. Instead of typing those commands or text, you can save time by copy-pasting them onto the command line Terminal application. You may have copy-pasted text several times in your Linux GUI applications ( e.g. in Gedit, <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-latest-libreoffice-on-ubuntu-20-04-lts\/\">LibreOffice<\/a>, <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/install-openoffice-on-ubuntu-20-04\/\">OpenOffice<\/a>) using the usual keyboard shortcuts Ctrl+c and Ctrl+v. But you may wonder to know these usual keyboard shortcuts do not work in Linux Terminal.<\/p>\n<p>In this quick Linux guide, you will learn how to copy and paste text in the Linux Terminal. For the demonstration, we will be using the <strong>Ubuntu 20.04 LTS<\/strong>. The same method can be followed in other Linux distributions.<\/p>\n<h2>Using the Keyboard Shortcuts<\/h2>\n<p>Instead of Ctrl+c and Ctrl+v, the shortcuts to copy and paste in the Linux Terminal are <strong>Ctrl+Shift+c<\/strong> and <strong>Ctrl+Shift+v. <\/strong><\/p>\n<h2>Example 1:<\/h2>\n<p>Let\u2019s say you want to copy the text or command from a document or webpage and paste it to the Terminal. To copy the lines from a document or webpage that is open in the graphical application, select them, and press Ctrl+c.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"174\" class=\"wp-image-5291\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-343.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-343.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-343-300x72.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>To paste the copied lines into Terminal, press <strong>Ctrl+Shift+v.<\/strong> After that, you will see the pasted lines on the Terminal.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1090\" height=\"55\" class=\"wp-image-5292\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-344.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-344.png 1090w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-344-300x15.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-344-1024x52.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-344-768x39.png 768w\" sizes=\"auto, (max-width: 1090px) 100vw, 1090px\" \/><\/p>\n<h2>Example 2:<\/h2>\n<p>Let\u2019s say you want to copy a line or command from the Nano editor and paste it to the Terminal. To copy it from the Nano editor, select it and press <strong>Ctrl+Shift+c<\/strong>.<\/p>\n<p>To paste the copied lines to Nano editor or to shell outside Nano editor, press Ctrl+Shift+v. Now you will see the pasted lines on the Terminal.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1191\" height=\"297\" class=\"wp-image-5293\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-345.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-345.png 1191w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-345-300x75.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-345-1024x255.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-345-768x192.png 768w\" sizes=\"auto, (max-width: 1191px) 100vw, 1191px\" \/><\/p>\n<h2>Using the Mouse Right-click<\/h2>\n<p>You can also copy-paste in Terminal using the mouse right-click as you normally do with other applications. For instance, to copy any line from Terminal, select it and right-click it. Then pick <strong>Copy<\/strong> from the list of options that pop-up. Now the selected line will be copied.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"763\" height=\"255\" class=\"wp-image-5294\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-346.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-346.png 763w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-346-300x100.png 300w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \/><\/p>\n<p>Now to paste the copied line in the Terminal, again right-click and select <strong>Paste<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"236\" class=\"wp-image-5295\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-347.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-347.png 689w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-347-300x103.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/p>\n<p>Now you will see the pasted line on the Terminal.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"163\" class=\"wp-image-5296\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-348.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-348.png 681w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-348-300x72.png 300w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/p>\n<p>This is how you can copy and paste text in the Linux Terminal. I hope you will find this quick guide helpful as it saves the time that spends in typing the long commands and text.<\/p>","protected":false},"excerpt":{"rendered":"<p>Sometimes while working in the Linux command line, you need to type the long commands or texts you found in the file or on the internet. Instead of&hellip;<\/p>","protected":false},"author":1,"featured_media":5331,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[240,242,241],"class_list":["post-5290","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-copy-text","tag-linux-terminal","tag-paste-text"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=5290"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5290\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/5331"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=5290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=5290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=5290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}