{"id":16292,"date":"2022-03-30T10:30:53","date_gmt":"2022-03-30T10:30:53","guid":{"rendered":"https:\/\/linuxways.net\/?p=16292"},"modified":"2022-03-30T10:30:53","modified_gmt":"2022-03-30T10:30:53","slug":"how-to-copy-and-paste-in-ubuntu","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-copy-and-paste-in-ubuntu\/","title":{"rendered":"How to Copy and Paste in Ubuntu"},"content":{"rendered":"<p>Copy-paste procedures are used in user-interface design and human-computer interaction to provide an inter process communication method for moving data across a system&#8217;s user interface. The &#8220;copy&#8221; command is used to duplicate data and place it in a temporary location. i.e., clipboard. The clipboard data is then put in the desired spot. Any program that supports the capability and allows data transfer can access the duplicated data.<\/p>\n<p>Rather than inputting long sentences word by word, you can save time by using copy-pasting strategies. You may have copied and pasted text several times in your Ubuntu Graphical User Applications using the conventional keyboard instructions \u201cCTRL+C\u201d and \u201cCTRL+V\u201d. Many standard keyboard shortcuts, however, do not work with Ubuntu Terminal, which may surprise you.<\/p>\n<h2>Methods for Copy and Paste in Ubuntu<\/h2>\n<p>In this article, the two different approaches through which you can copy and paste in Ubuntu will be discussed. These approaches involve:<\/p>\n<ul>\n<li>Using the right-click context menu<\/li>\n<li>Using keyboard shortcuts<\/li>\n<\/ul>\n<h3>Method-1: Copy-Paste using \u201cright-click context menu\u201d<\/h3>\n<p>Copy-paste can be done using the mouse right-click, just like in other Ubuntu applications. For this purpose, choose the text you wish to copy. Then right-click on it and select &#8220;Copy&#8221; from the drop-down menu. This copied command can be pasted into a terminal window, a script, or any other document.<\/p>\n<p>Let&#8217;s go through some basic examples for a better understanding of this concept:<\/p>\n<h3>Example-1: Copy and Paste between two terminal windows<\/h3>\n<p>By using the right-click method, you can copy any text from one terminal window and paste it on another terminal window.<\/p>\n<p>For this purpose, pick the command and choose the &#8220;Copy&#8221; option from the drop-down menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"266\" class=\"wp-image-16293\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-9.png\" alt=\"Graphical user interface, text, application Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-9.png 596w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-9-300x134.png 300w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/p>\n<p>After copying the selected command, you can paste it into the other terminal by choosing the &#8220;Paste&#8221; option from the drop-down menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"303\" class=\"wp-image-16294\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall.png\" alt=\"Graphical user interface Description automatically generated with medium confidence\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall.png 618w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-300x147.png 300w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/p>\n<p>After clicking on the &#8220;Paste&#8221; option, you will get the exact copied text as output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"135\" class=\"wp-image-16295\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-1.png\" alt=\"Graphical user interface Description automatically generated with low confidence\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-1.png 682w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-1-300x59.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/p>\n<h3>Example-2: Copy and paste between the terminal and text document<\/h3>\n<p>By using the right-click method, you can copy any text from one terminal window and paste it into any text document. For this purpose, pick the command and choose the &#8220;Copy&#8221; option from the drop-down menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"266\" class=\"wp-image-16296\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-10.png\" alt=\"Graphical user interface, text, application Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-10.png 596w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-10-300x134.png 300w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/p>\n<p>Then, you have to create a text document by using the &#8220;Touch&#8221; command and place the file in your desired location. In my case, I have created a text document named &#8220;myfile&#8221; by using the command &#8220;touch myfile&#8221; and placing it in the &#8220;home&#8221; location. After copying the selected command, you can paste it into the text document by choosing the &#8220;Paste&#8221; option from the drop-down menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"379\" class=\"wp-image-16297\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-application-description-11.png\" alt=\"Graphical user interface, application Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-application-description-11.png 732w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-application-description-11-300x155.png 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/p>\n<p>After clicking on the &#8220;Paste&#8221; option, you will get the exact copied text as output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"198\" class=\"wp-image-16298\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-11.png\" alt=\"Graphical user interface, text, application Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-11.png 612w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-11-300x97.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/p>\n<h3>Method-2: Copy-Paste using keyboard shortcuts<\/h3>\n<p>Most computer users are familiar with the shortcuts &#8220;CTRL+C&#8221; and &#8220;CTRL+V&#8221; for copying and pasting text. On the Ubuntu Desktop, these shortcuts also work, but not in the case of the terminal. To copy or paste commands in the Ubuntu terminal, you have to include the &#8220;Shift&#8221; key in the &#8220;CTRL+C&#8221; and &#8220;CTRL+V&#8221; shortcuts.<\/p>\n<p>The rules are straightforward:<\/p>\n<ul>\n<li>You can press &#8220;CTRL+Shift+C&#8221; to copy text or commands from the Ubuntu terminal.<\/li>\n<li>You can press &#8220;CTRL+Shift+V&#8221; to paste text or a command into the Ubuntu terminal.<\/li>\n<li>You can press &#8220;CTRL+C&#8221; to copy text or a command from outside the Ubuntu terminal.<\/li>\n<li>You can press &#8220;CTRL+V&#8221; to paste text or command into any document or script.<\/li>\n<\/ul>\n<p>Let&#8217;s go through some basic examples for a better understanding of this concept:<\/p>\n<h3>Example-1: Copy and Paste between two terminal windows<\/h3>\n<p>By using keyboard shortcuts, you can copy any text from one terminal window and paste it into another terminal window.<\/p>\n<p>For this purpose, pick the command and press &#8220;CTRL+SHIFT+C\u201d to copy the command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"107\" class=\"wp-image-16299\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/text-description-automatically-generated-14.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/text-description-automatically-generated-14.png 350w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/text-description-automatically-generated-14-300x92.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<p>After copying the selected command, you can paste it into the other terminal by pressing &#8220;CTRL+SHIFT+V\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"317\" height=\"96\" class=\"wp-image-16300\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/a-screenshot-of-a-computer-description-automatica.png\" alt=\"A screenshot of a computer Description automatically generated with low confidence\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/a-screenshot-of-a-computer-description-automatica.png 317w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/a-screenshot-of-a-computer-description-automatica-300x91.png 300w\" sizes=\"auto, (max-width: 317px) 100vw, 317px\" \/><\/p>\n<p>After pressing &#8220;CTRL+SHIFT+V,&#8221; you will get the exact copied text as output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"135\" class=\"wp-image-16301\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-2.png\" alt=\"Graphical user interface Description automatically generated with low confidence\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-2.png 682w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-2-300x59.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/p>\n<h2>Example-2: Copy and Paste between the terminal and text document<\/h2>\n<p>By using the right-click method, you can copy any text from one terminal window and paste it into any text document.<\/p>\n<p>For this purpose, pick the command and press &#8220;CTRL+SHIFT+C\u201d to copy the command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"107\" class=\"wp-image-16302\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/text-description-automatically-generated-15.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/text-description-automatically-generated-15.png 350w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/text-description-automatically-generated-15-300x92.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<p>Then, you have to create a text document by using the &#8220;Touch&#8221; command and place the file in your desired location. In my case, I have created a text document named &#8220;myfile&#8221; by using the command &#8220;touch myfile&#8221; and placing it in the &#8220;home&#8221; location. After copying the selected command, you can paste it into the other terminal by pressing &#8220;CTRL + V&#8221;:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"460\" height=\"175\" class=\"wp-image-16303\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-3.png\" alt=\"Graphical user interface Description automatically generated with medium confidence\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-3.png 460w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-description-automaticall-3-300x114.png 300w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/p>\n<p>After pressing &#8220;CTRL+V,&#8221; you will get the exact copied text as output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"198\" class=\"wp-image-16304\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-12.png\" alt=\"Graphical user interface, text, application Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-12.png 612w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/03\/graphical-user-interface-text-application-descr-12-300x97.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>Copy-paste in Ubuntu provides the facility to copy and paste text or commands without having to retype them. This method also saves you time, which you can put to better use. The two distinct approaches to &#8220;how to copy-paste in Ubuntu&#8221; are discussed in this article. i.e., right-click approach and keyboard shortcuts approach. Using the keyboard shortcuts approach for copy-paste is easier than using the mouse right-click approach.<\/p>","protected":false},"excerpt":{"rendered":"<p>Copy-paste procedures are used in user-interface design and human-computer interaction to provide an inter process communication method for moving data across a system&#8217;s user interface. The &#8220;copy&#8221; command&hellip;<\/p>","protected":false},"author":1,"featured_media":16320,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[240,241,31],"class_list":["post-16292","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-copy-text","tag-paste-text","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16292","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=16292"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16292\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/16320"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=16292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=16292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=16292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}