🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 92 (from laksa163)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
7 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.3 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://www.wikihow.com/Copy-Files-in-Linux
Last Crawled2026-04-05 02:50:43 (7 days ago)
First Indexed2017-10-14 16:12:48 (8 years ago)
HTTP Status Code200
Meta Title2 Simple Ways to Copy Files in Linux
Meta DescriptionCopy and paste a file in Linux with this handy guideThis wikiHow teaches you how to copy and paste a file on a Linux computer. The command line can be used to copy and paste files, or you can use the keyboard shortcuts or your computer's...
Meta Canonicalnull
Boilerpipe Text
Download Article Copy and paste a file in Linux with this handy guide Download Article Using the Command Line | Using the Interface | Video | Q&A | Tips | Warnings This wikiHow teaches you how to copy and paste a file on a Linux computer. The command line can be used to copy and paste files, or you can use the keyboard shortcuts or your computer's right-click function if you're using a version of Linux that has a user interface. Things You Should Know Open the Terminal by pressing Alt + Ctrl + T on most Linux versions. Type in cd path where "path" is the address of the folder in which the file you want to copy is located. Type the "copy" tag cp followed by a file's name and extension. Click or double-click the Terminal app icon, which usually resembles a black box with a white ">_" on it. You can also just press Alt + Ctrl + T to open Terminal on most Linux versions. Type in cd path where "path" is the address of the folder in which the file you want to copy is located, then press ↵ Enter . For example, to tell Terminal to look for your file in the Desktop folder, you would type cd Desktop into Terminal. Make sure you capitalize the folder's name if necessary. If attempting to switch to a folder results in an error, you'll need to enter the folder's entire path (e.g., /home/name/Desktop/folder instead of just folder ) here. Advertisement This tag is cp with a space after it. Type in the name and extension of the file you want to copy after cp and the space, then add a space. For example, if you want to copy a file named "hello", you would type cp hello into Terminal. If the file name has an extension on the end of it (e.g., ".desktop"), make sure you include the extension in the file's name when typing it into Terminal. Type in the path for the folder into which you want to copy the file. For example, if you want to copy "hello" into a folder named "Hi" that's stored in the Documents folder, you would have cp hello /home/name/Documents/Hi (where "name" is your username) typed into Terminal. Doing so will run your command. Your file will be pasted into the folder you specified. Advertisement As with virtually all operating systems that have user interfaces, you can use keyboard shortcuts to copy and paste files on Linux: Click the file you want to copy to select it, or drag your mouse across multiple files to select them all. Press Ctrl + C to copy the files. Go to the folder into which you want to copy the files. Press Ctrl + V to paste in the files. Go to the location in which the file is located. Click once the file to do so. Doing so will prompt a drop-down menu. Some Linux versions will also display a menu bar at the top of the screen. If so, you can click Edit instead of right-clicking the selected file. It's in the drop-down menu. This copies the selected file. You may click Copy... or Copy File on some versions of Linux. Find the folder into which you want to paste the file. This will create a drop-down menu in the folder. It's in the drop-down menu. Doing so pastes in your copied file. Advertisement Search Add New Question Question What option will allow me to copy the contents of /dir1 to /dir2 while preserving the modification times, ownership, and permissions? Community Answer You can try "-a" for an archive to preserve as much as possible. You can also do "--preserve" followed by a comma-separated list of attributes to preserve (or "--preserve all"). Finally, try "cp --help" or "man cp" for more options. Ask a Question 200 characters left Include your email address to get a message when this question is answered. Submit Advertisement Video If you want to move a file to a different folder rather than copying the file, you can type mv instead of cp when specifying the file's name and its destination (e.g., mv hello Documents ). Thanks Holding down Ctrl while clicking individual files will select each file you click. Right-clicking one of the selected files and selecting Copy will then copy all of the selected files. Thanks Thanks for submitting a tip for review! Advertisement Not all versions of Linux have a user interface. If your version of Linux has only a command line, you'll need to use the "cp" command to copy your files. Thanks Advertisement About This Article Thanks to all authors for creating a page that has been read 235,115 times. Is this article up to date? Keep up with tech in just 5 minutes a week! Subscribe You're all set! X For over two decades, we’ve been on a mission: to help everyone in the world learn how to do anything. Our articles are human written and expert endorsed to ensure readers like you get reliable, current information. Before you get back to learning, we would be grateful if you could take a minute to support wikiHow. Any amount helps. Thank you. - -
Markdown
[Skip to Content](https://www.wikihow.com/Copy-Files-in-Linux#breadcrumb_1) [Quizzes](https://www.wikihow.com/Quizzes) - [PRO](https://www.wikihow.com/Pro) [Courses Hot](https://www.wikihow.com/Course/Explore) [Guides](https://www.wikihow.com/Guides) [Tech Help Pro](https://www.wikihow.com/Tech-Help-Pro) [Expert Videos](https://www.wikihow.com/wikiHow:Videos-wikiHowPro) [About wikiHow Pro](https://www.wikihow.com/Pro) [Upgrade](https://www.wikihow.com/Copy-Files-in-Linux#wh-dialog-pro) - [QUIZZES](https://www.wikihow.com/Quizzes) [All Quizzes Hot](https://www.wikihow.com/Quizzes) [Love Quizzes](https://www.wikihow.com/Love-Quizzes) [Personality Quizzes](https://www.wikihow.com/Personality-Quizzes) [Trivia Quizzes](https://www.wikihow.com/Trivia-Quizzes) [Taylor Swift Quizzes](https://www.wikihow.com/Taylor-Swift-Quizzes) - [EDIT](https://www.wikihow.com/Copy-Files-in-Linux#wh-dialog-edit) [Edit this Article](https://www.wikihow.com/Copy-Files-in-Linux#wh-dialog-edit) - [EXPLORE](https://www.wikihow.com/Copy-Files-in-Linux) [Tech Help Pro](https://www.wikihow.com/Tech-Help-Pro)[About Us](https://www.wikihow.com/wikiHow:About-wikiHow)[Random Article](https://www.wikihow.com/Special:Randomizer)[Quizzes](https://www.wikihow.com/Quizzes) [Request a New Article](https://www.wikihow.com/Special:RequestTopic)[Community Dashboard](https://www.wikihow.com/Special:CommunityDashboard)[Trending](https://www.wikihow.com/Trending)[Forums](https://www.wikihow.com/Forums) [Arts and Entertainment](https://www.wikihow.com/Category:Arts-and-Entertainment)[Artwork](https://www.wikihow.com/Category:Artwork)[Books](https://www.wikihow.com/Category:Books)[Movies](https://www.wikihow.com/Category:Movies) [Computers and Electronics](https://www.wikihow.com/Category:Computers-and-Electronics)[Computers](https://www.wikihow.com/Category:Computers)[Phone Skills](https://www.wikihow.com/Category:Phone-Skills)[Technology Hacks](https://www.wikihow.com/Category:Technology-Hacks) [Health](https://www.wikihow.com/Category:Health)[Men's Health](https://www.wikihow.com/Category:Men%27s-Health)[Mental Health](https://www.wikihow.com/Category:Psychological-Health)[Women's Health](https://www.wikihow.com/Category:Women%E2%80%99s-Health) [Relationships](https://www.wikihow.com/Category:Relationships)[Dating](https://www.wikihow.com/Category:Dating)[Love](https://www.wikihow.com/Category:Love)[Relationship Issues](https://www.wikihow.com/Category:Relationship-Issues) [Hobbies and Crafts](https://www.wikihow.com/Category:Hobbies-and-Crafts)[Crafts](https://www.wikihow.com/Category:Crafts)[Drawing](https://www.wikihow.com/Category:Drawing)[Games](https://www.wikihow.com/Category:Games) [Education & Communication](https://www.wikihow.com/Category:Education-and-Communications)[Communication Skills](https://www.wikihow.com/Category:Communication-Skills)[Personal Development](https://www.wikihow.com/Category:Personal-Development)[Studying](https://www.wikihow.com/Category:Studying) [Personal Care and Style](https://www.wikihow.com/Category:Personal-Care-and-Style)[Fashion](https://www.wikihow.com/Category:Fashion)[Hair Care](https://www.wikihow.com/Category:Hair-Care)[Personal Hygiene](https://www.wikihow.com/Category:Personal-Hygiene) [Quizzes](https://www.wikihow.com/Quizzes) [Love Quizzes](https://www.wikihow.com/Love-Quizzes) [Personality Quizzes](https://www.wikihow.com/Personality-Quizzes) [Fun Games](https://www.wikihow.com/Generators) [Arts and Entertainment](https://www.wikihow.com/Category:Arts-and-Entertainment)[Finance and Business](https://www.wikihow.com/Category:Finance-and-Business)[Home and Garden](https://www.wikihow.com/Category:Home-and-Garden)[Relationship Quizzes](https://www.wikihow.com/Relationships#Quizzes) [Cars & Other Vehicles](https://www.wikihow.com/Category:Cars-%26-Other-Vehicles)[Food and Entertaining](https://www.wikihow.com/Category:Food-and-Entertaining)[Personal Care and Style](https://www.wikihow.com/Category:Personal-Care-and-Style)[Sports and Fitness](https://www.wikihow.com/Category:Sports-and-Fitness) [Computers and Electronics](https://www.wikihow.com/Category:Computers-and-Electronics)[Health](https://www.wikihow.com/Category:Health)[Pets and Animals](https://www.wikihow.com/Category:Pets-and-Animals)[Travel](https://www.wikihow.com/Category:Travel) [Education & Communication](https://www.wikihow.com/Category:Education-and-Communications)[Hobbies and Crafts](https://www.wikihow.com/Category:Hobbies-and-Crafts)[Philosophy and Religion](https://www.wikihow.com/Category:Philosophy-and-Religion)[Work World](https://www.wikihow.com/Category:Work-World) [Family Life](https://www.wikihow.com/Category:Family-Life)[Holidays and Traditions](https://www.wikihow.com/Category:Holidays-and-Traditions)[Relationships](https://www.wikihow.com/Category:Relationships)[Youth](https://www.wikihow.com/Category:Youth) - [LOG IN](https://www.wikihow.com/Copy-Files-in-Linux#wh-dialog-login) ### Log in Social login does not work in incognito and private browsers. Please log in with your username or email to continue. [Facebook](https://www.wikihow.com/Copy-Files-in-Linux) [Google](https://www.wikihow.com/Copy-Files-in-Linux) [wikiHow Account](https://www.wikihow.com/Copy-Files-in-Linux#wh-dialog-login) No account yet? [Create an account](https://www.wikihow.com/Special:UserLogin?type=signup) - [RANDOM](https://www.wikihow.com/Copy-Files-in-Linux) - [Home](https://www.wikihow.com/Main-Page) - [Random](https://www.wikihow.com/Special:Randomizer) - [Browse Articles](https://www.wikihow.com/Special:CategoryListing) - [TrendingNew](https://www.wikihow.com/Trending) - Quizzes & Games - [All QuizzesHot](https://www.wikihow.com/Quizzes) - [Love Quizzes](https://www.wikihow.com/Love-Quizzes) - [Personality Quizzes](https://www.wikihow.com/Personality-Quizzes) - [Fun Games](https://www.wikihow.com/Generators) - [Dating Simulator](https://www.wikihow.com/Dating-Simulator) - Learn Something New - [Forums](https://www.wikihow.com/Forum) - [Courses](https://www.wikihow.com/Course/Explore) - [Happiness Hub](https://www.wikihow.com/Academy/Shawn-Achor) - Explore More - [Support wikiHow](https://www.wikihow.com/Special:Contribute) - [About wikiHow](https://www.wikihow.com/wikiHow:About-wikiHow) - [Log in / Sign up](https://www.wikihow.com/Copy-Files-in-Linux#wh-dialog-login) [Terms of Use](https://www.wikihow.com/wikiHow:Terms-of-Use) [wikiHow is where trusted research and expert knowledge come together. Learn why people **trust wikiHow**](https://www.wikihow.com/wikiHow:Delivering-a-Trustworthy-Experience) - [Categories](https://www.wikihow.com/Special:CategoryListing "Special:CategoryListing") - [Computers and Electronics](https://www.wikihow.com/Category:Computers-and-Electronics "Category:Computers and Electronics") - [Operating Systems](https://www.wikihow.com/Category:Operating-Systems "Category:Operating Systems") - [Linux](https://www.wikihow.com/Category:Linux "Category:Linux") # [How to Copy Files in Linux: A Complete Guide](https://www.wikihow.com/Copy-Files-in-Linux) [![PDF download](https://www.wikihow.com/extensions/wikihow/socialstamp/images/icon-pdf.svg) Download Article](https://www.wikihow.com/Copy-Files-in-Linux) Copy and paste a file in Linux with this handy guide **Written by** [Jack Lloyd](https://www.wikihow.com/Author/Jack-Lloyd) [Last Updated: December 23, 2024](https://www.wikihow.com/Copy-Files-in-Linux) [Tested](https://www.wikihow.com/Copy-Files-in-Linux) [![PDF download](https://www.wikihow.com/extensions/wikihow/socialstamp/images/icon-pdf.svg) Download Article](https://www.wikihow.com/Copy-Files-in-Linux) - [Using the Command Line](https://www.wikihow.com/Copy-Files-in-Linux#Using-the-Command-Line) - [Using the Interface](https://www.wikihow.com/Copy-Files-in-Linux#Using-the-Interface) - [Video](https://www.wikihow.com/Copy-Files-in-Linux#Video) - [Q\&A](https://www.wikihow.com/Copy-Files-in-Linux#qa_headline) - [Tips](https://www.wikihow.com/Copy-Files-in-Linux#tips) - [Warnings](https://www.wikihow.com/Copy-Files-in-Linux#warnings) \|Show more \|Show less X This article was co-authored by wikiHow staff writer, [Jack Lloyd](https://www.wikihow.com/Author/Jack-Lloyd). Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. The wikiHow Tech Team also followed the article's instructions and verified that they work. This article has been viewed 235,115 times. [Learn more...](https://www.wikihow.com/wikiHow:Delivering-a-Trustworthy-Experience) This wikiHow teaches you how to copy and paste a file on a Linux computer. The command line can be used to copy and paste files, or you can use the keyboard shortcuts or your computer's right-click function if you're using a version of Linux that has a user interface. ## Things You Should Know - Open the Terminal by pressing `Alt`\+`Ctrl`\+`T` on most Linux versions. - Type in `cd path` where "path" is the address of the folder in which the file you want to copy is located. - Type the "copy" tag `cp` followed by a file's name and extension. ## Steps Method 1 Method 1 of 2: ### Using the Command Line [![PDF download](https://www.wikihow.com/extensions/wikihow/socialstamp/images/icon-pdf.svg) Download Article](https://www.wikihow.com/Copy-Files-in-Linux) 1. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 1 Open Terminal.](https://www.wikihow.com/images/thumb/9/98/Copy-Files-in-Linux-Step-1-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-1-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-1-Version-2.jpg) 1 **Open Terminal.** Click or double-click the Terminal app icon, which usually resembles a black box with a white "\>\_" on it. - You can also just press `Alt`\+`Ctrl`\+`T` to open Terminal on most Linux versions. 2. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 2 Go to the proper directory.](https://www.wikihow.com/images/thumb/a/ab/Copy-Files-in-Linux-Step-2-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-2-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-2-Version-2.jpg) 2 **Go to the proper directory.** Type in `cd path` where "path" is the address of the folder in which the file you want to copy is located, then press `↵ Enter`. - For example, to tell Terminal to look for your file in the Desktop folder, you would type `cd Desktop` into Terminal. - Make sure you capitalize the folder's name if necessary. - If attempting to switch to a folder results in an error, you'll need to enter the folder's entire path (e.g., `/home/name/Desktop/folder` instead of just `folder`) here. Advertisement 3. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 3 Type in the "copy" tag.](https://www.wikihow.com/images/thumb/8/81/Copy-Files-in-Linux-Step-3-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-3-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-3-Version-2.jpg) 3 **Type in the "copy" tag.** This tag is `cp` with a space after it. 4. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 4 Enter a file's name.](https://www.wikihow.com/images/thumb/b/b3/Copy-Files-in-Linux-Step-4-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-4-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-4-Version-2.jpg) 4 **Enter a file's name.** Type in the name and extension of the file you want to copy after `cp` and the space, then add a space. - For example, if you want to copy a file named "hello", you would type `cp hello` into Terminal. - If the file name has an extension on the end of it (e.g., ".desktop"), make sure you include the extension in the file's name when typing it into Terminal. 5. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 5 Enter the destination folder.](https://www.wikihow.com/images/thumb/6/6e/Copy-Files-in-Linux-Step-5-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-5-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-5-Version-2.jpg) 5 **Enter the destination folder.** Type in the path for the folder into which you want to copy the file. - For example, if you want to copy "hello" into a folder named "Hi" that's stored in the Documents folder, you would have `cp hello /home/name/Documents/Hi` (where "name" is your username) typed into Terminal. 6. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 6 Press ↵ Enter.](https://www.wikihow.com/images/thumb/6/60/Copy-Files-in-Linux-Step-6-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-6-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-6-Version-2.jpg) 6 **Press **`↵ Enter`**.** Doing so will run your command. Your file will be pasted into the folder you specified. Method 2 Method 2 of 2: ### Using the Interface [![PDF download](https://www.wikihow.com/extensions/wikihow/socialstamp/images/icon-pdf.svg) Download Article](https://www.wikihow.com/Copy-Files-in-Linux) 1. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 1 Consider using keyboard shortcuts.](https://www.wikihow.com/images/thumb/3/33/Copy-Files-in-Linux-Step-7-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-7-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-7-Version-2.jpg) 1 **Consider using keyboard shortcuts.** As with virtually all operating systems that have user interfaces, you can use keyboard shortcuts to copy and paste files on Linux: - Click the file you want to copy to select it, or drag your mouse across multiple files to select them all. - Press `Ctrl`\+`C` to copy the files. - Go to the folder into which you want to copy the files. - Press `Ctrl`\+`V` to paste in the files. 2. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 2 Find the file you want to copy.](https://www.wikihow.com/images/thumb/4/49/Copy-Files-in-Linux-Step-8-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-8-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-8-Version-2.jpg) 2 **Find the file you want to copy.** Go to the location in which the file is located. 3. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 3 Select the file.](https://www.wikihow.com/images/thumb/3/33/Copy-Files-in-Linux-Step-9-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-9-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-9-Version-2.jpg) 3 **Select the file.** Click once the file to do so. 4. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 4 Right-click the file.](https://www.wikihow.com/images/thumb/2/21/Copy-Files-in-Linux-Step-10-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-10-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-10-Version-2.jpg) 4 **Right-click the file.** Doing so will prompt a drop-down menu. - Some Linux versions will also display a menu bar at the top of the screen. If so, you can click **Edit** instead of right-clicking the selected file. 5. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 5 Click Copy.](https://www.wikihow.com/images/thumb/2/24/Copy-Files-in-Linux-Step-11-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-11-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-11-Version-2.jpg) 5 **Click **Copy**.** It's in the drop-down menu. This copies the selected file. - You may click **Copy...** or **Copy File** on some versions of Linux. 6. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 6 Go to the destination folder.](https://www.wikihow.com/images/thumb/b/b4/Copy-Files-in-Linux-Step-12-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-12-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-12-Version-2.jpg) 6 **Go to the destination folder.** Find the folder into which you want to paste the file. 7. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 7 Right-click an empty space.](https://www.wikihow.com/images/thumb/c/cd/Copy-Files-in-Linux-Step-13-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-13-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-13-Version-2.jpg) 7 **Right-click an empty space.** This will create a drop-down menu in the folder. 8. [Helpful?](https://www.wikihow.com/Copy-Files-in-Linux) [![Step 8 Click Paste.](https://www.wikihow.com/images/thumb/a/a7/Copy-Files-in-Linux-Step-14-Version-2.jpg/v4-460px-Copy-Files-in-Linux-Step-14-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Linux#/Image:Copy-Files-in-Linux-Step-14-Version-2.jpg) 8 **Click **Paste**.** It's in the drop-down menu. Doing so pastes in your copied file. ## Community Q\&A Search [Add New Question]() - Question What option will allow me to copy the contents of /dir1 to /dir2 while preserving the modification times, ownership, and permissions? ![Community Answer](https://www.wikihow.com/images/thumb/f/f5/CommunityAvatar4.png/-crop-104-104-104px-CommunityAvatar4.png) Community Answer You can try "-a" for an archive to preserve as much as possible. You can also do "--preserve" followed by a comma-separated list of attributes to preserve (or "--preserve all"). Finally, try "cp --help" or "man cp" for more options. **Thanks! We're glad this was helpful.** **Thank you for your feedback.** If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even \$1 helps us in our mission. [Support wikiHow](https://www.wikihow.com/wikiHow:Contribute) [Yes](https://www.wikihow.com/Copy-Files-in-Linux) [No](https://www.wikihow.com/Copy-Files-in-Linux) [Not Helpful 1](https://www.wikihow.com/Copy-Files-in-Linux) [Helpful 0](https://www.wikihow.com/Copy-Files-in-Linux) Ask a Question 200 characters left Include your email address to get a message when this question is answered. [Submit]() Advertisement ## Video ## Tips - If you want to move a file to a different folder rather than copying the file, you can type **mv** instead of **cp** when specifying the file's name and its destination (e.g., **mv hello Documents**). Thanks [Helpful 1](https://www.wikihow.com/Copy-Files-in-Linux) [Not Helpful 0](https://www.wikihow.com/Copy-Files-in-Linux) - Holding down `Ctrl` while clicking individual files will select each file you click. Right-clicking one of the selected files and selecting **Copy** will then copy all of the selected files. Thanks [Helpful 0](https://www.wikihow.com/Copy-Files-in-Linux) [Not Helpful 0](https://www.wikihow.com/Copy-Files-in-Linux) Submit a Tip All tip submissions are carefully reviewed before being published Name Please provide your name and last initial [Submit](https://www.wikihow.com/Copy-Files-in-Linux) Thanks for submitting a tip for review\! Advertisement ## Warnings - Not all versions of Linux have a user interface. If your version of Linux has only a command line, you'll need to use the "cp" command to copy your files. Thanks [Helpful 0](https://www.wikihow.com/Copy-Files-in-Linux) [Not Helpful 0](https://www.wikihow.com/Copy-Files-in-Linux) Advertisement ## You Might Also Like [![Move from Windows to Linux](https://www.wikihow.com/images/thumb/c/cf/Move-from-Windows-to-Linux-Step-8-Version-3.jpg/-crop-342-184-244px-Move-from-Windows-to-Linux-Step-8-Version-3.jpg.webp) How to Switch from Microsoft Windows to Linux ![](https://www.wikihow.com/images/thumb/c/cf/Move-from-Windows-to-Linux-Step-8-Version-3.jpg/-crop-342-184-244px-Move-from-Windows-to-Linux-Step-8-Version-3.jpg)](https://www.wikihow.com/Move-from-Windows-to-Linux) [![Transfer Files from One Linux Server to Another](https://www.wikihow.com/images/thumb/e/e9/Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg/-crop-342-184-245px-Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg.webp) How to Transfer Files from One Linux Server to Another ![](https://www.wikihow.com/images/thumb/e/e9/Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg/-crop-342-184-245px-Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg)](https://www.wikihow.com/Transfer-Files-from-One-Linux-Server-to-Another) [![Move Files in Ubuntu](https://www.wikihow.com/images/thumb/e/eb/Move-Files-in-Ubuntu-Step-9.jpg/-crop-342-184-246px-Move-Files-in-Ubuntu-Step-9.jpg.webp) How to Move Files in Ubuntu ![](https://www.wikihow.com/images/thumb/e/eb/Move-Files-in-Ubuntu-Step-9.jpg/-crop-342-184-246px-Move-Files-in-Ubuntu-Step-9.jpg)](https://www.wikihow.com/Move-Files-in-Ubuntu) [![Copy Files in Command Prompt](https://www.wikihow.com/images/thumb/f/f2/Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg/-crop-342-184-327px-Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg.webp) How to Copy Files in Command Prompt ![](https://www.wikihow.com/images/thumb/f/f2/Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg/-crop-342-184-327px-Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Command-Prompt) [![Copy a Directory Linux](https://www.wikihow.com/images/thumb/e/ea/Copy-a-Directory-Linux-Step-9.jpg/-crop-342-184-245px-Copy-a-Directory-Linux-Step-9.jpg.webp) How to Copy a Directory with the cp Command on Linux ![](https://www.wikihow.com/images/thumb/e/ea/Copy-a-Directory-Linux-Step-9.jpg/-crop-342-184-245px-Copy-a-Directory-Linux-Step-9.jpg)](https://www.wikihow.com/Copy-a-Directory-Linux) [![Cygwin Command Cheat Sheet](https://www.wikihow.com/images/thumb/f/f9/Cygwin-Command-Cheat-Sheet-Step-16.jpg/-crop-342-184-245px-Cygwin-Command-Cheat-Sheet-Step-16.jpg.webp)Cygwin Command Cheat Sheet ![](https://www.wikihow.com/images/thumb/f/f9/Cygwin-Command-Cheat-Sheet-Step-16.jpg/-crop-342-184-245px-Cygwin-Command-Cheat-Sheet-Step-16.jpg)](https://www.wikihow.com/Cygwin-Command-Cheat-Sheet) [![Copy and Paste on a Mac](https://www.wikihow.com/images/thumb/c/cc/Copy-and-Paste-on-a-Mac-Step-24.jpg/-crop-342-184-245px-Copy-and-Paste-on-a-Mac-Step-24.jpg.webp)5 Fastest Ways to Copy and Paste on a Mac or MacBook ![](https://www.wikihow.com/images/thumb/c/cc/Copy-and-Paste-on-a-Mac-Step-24.jpg/-crop-342-184-245px-Copy-and-Paste-on-a-Mac-Step-24.jpg)](https://www.wikihow.com/Copy-and-Paste-on-a-Mac) [![Copy and Paste](https://www.wikihow.com/images/thumb/e/e1/Copy-and-Paste-Step-19-Version-3.jpg/-crop-342-184-245px-Copy-and-Paste-Step-19-Version-3.jpg.webp) How to Copy and Paste on Any Device ![](https://www.wikihow.com/images/thumb/e/e1/Copy-and-Paste-Step-19-Version-3.jpg/-crop-342-184-245px-Copy-and-Paste-Step-19-Version-3.jpg)](https://www.wikihow.com/Copy-and-Paste) [![Save Linux Files](https://www.wikihow.com/images/thumb/b/bd/Save-Linux-Files-Step-12.jpg/-crop-342-184-245px-Save-Linux-Files-Step-12.jpg.webp) How to Save Linux Files ![](https://www.wikihow.com/images/thumb/b/bd/Save-Linux-Files-Step-12.jpg/-crop-342-184-245px-Save-Linux-Files-Step-12.jpg)](https://www.wikihow.com/Save-Linux-Files) [![Run Files in Linux](https://www.wikihow.com/images/thumb/1/10/Run-Files-in-Linux-Step-9.jpg/-crop-342-184-247px-Run-Files-in-Linux-Step-9.jpg.webp) How to Run Files in Linux ![](https://www.wikihow.com/images/thumb/1/10/Run-Files-in-Linux-Step-9.jpg/-crop-342-184-247px-Run-Files-in-Linux-Step-9.jpg)](https://www.wikihow.com/Run-Files-in-Linux) [![Use the Command Terminal in Windows 10 to Move and Copy Files/Folders](https://www.wikihow.com/images/thumb/a/a7/Testimahe.jpg/-crop-342-184-328px-Testimahe.jpg.webp) How to Use the Windows 10 CLI to Move & Copy Files or Folders ![](https://www.wikihow.com/images/thumb/a/a7/Testimahe.jpg/-crop-342-184-328px-Testimahe.jpg)](https://www.wikihow.com/Use-the-Command-Terminal-in-Windows-10-to-Move-and-Copy-Files/Folders) [![Create a File in a Directory in Linux](https://www.wikihow.com/images/thumb/6/62/Create-a-File-in-a-Directory-in-Linux-Step-29.jpg/-crop-342-184-245px-Create-a-File-in-a-Directory-in-Linux-Step-29.jpg.webp) How to Create a File in a Directory in Linux ![](https://www.wikihow.com/images/thumb/6/62/Create-a-File-in-a-Directory-in-Linux-Step-29.jpg/-crop-342-184-245px-Create-a-File-in-a-Directory-in-Linux-Step-29.jpg)](https://www.wikihow.com/Create-a-File-in-a-Directory-in-Linux) [![Cut and Paste](https://www.wikihow.com/images/thumb/7/73/Cut-and-Paste-Step-19.jpg/-crop-342-184-245px-Cut-and-Paste-Step-19.jpg.webp)4 Quick Ways to Cut and Paste Text on Any Device ![](https://www.wikihow.com/images/thumb/7/73/Cut-and-Paste-Step-19.jpg/-crop-342-184-245px-Cut-and-Paste-Step-19.jpg)](https://www.wikihow.com/Cut-and-Paste) [![Create a File in Unix](https://www.wikihow.com/images/thumb/9/9b/Create-a-File-in-Unix-Step-19.jpg/-crop-342-184-245px-Create-a-File-in-Unix-Step-19.jpg.webp) How to Create a File in Unix ![](https://www.wikihow.com/images/thumb/9/9b/Create-a-File-in-Unix-Step-19.jpg/-crop-342-184-245px-Create-a-File-in-Unix-Step-19.jpg)](https://www.wikihow.com/Create-a-File-in-Unix) Advertisement ## About This Article ![Jack Lloyd](https://www.wikihow.com/images/thumb/f/f9/Jack-Lloyd.png/-crop-100-100-100px-Jack-Lloyd.png) Written by: [Jack Lloyd](https://www.wikihow.com/Author/Jack-Lloyd) wikiHow Technology Writer This article was co-authored by wikiHow staff writer, [Jack Lloyd](https://www.wikihow.com/Author/Jack-Lloyd). Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 235,115 times. How helpful is this? Co-authors: 7 Updated: December 23, 2024 Views: 235,115 Categories: [Linux](https://www.wikihow.com/Category:Linux "Category:Linux") [In other languages](https://www.wikihow.com/Copy-Files-in-Linux#other_languages) [Spanish](https://es.wikihow.com/copiar-archivos-en-Linux) [Italian](https://www.wikihow.it/Copiare-i-File-in-Linux) [Portuguese](https://pt.wikihow.com/Copiar-Arquivos-no-Linux) [Russian](https://ru.wikihow.com/%D0%BA%D0%BE%D0%BF%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C-%D1%84%D0%B0%D0%B9%D0%BB%D1%8B-%D0%B2-%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D0%BE%D0%B9-%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B5-Linux) [French](https://fr.wikihow.com/copier-des-fichiers-sous-Linux) [Indonesian](https://id.wikihow.com/Menyalin-Berkas-pada-Komputer-Linux) [Dutch](https://nl.wikihow.com/Bestanden-kopi%C3%ABren-in-Linux) - [Print](https://www.wikihow.com/Copy-Files-in-Linux) - [Send fan mail to authors](https://www.wikihow.com/Copy-Files-in-Linux) Thanks to all authors for creating a page that has been read 235,115 times. ## Is this article up to date? Yes No Advertisement Cookies make wikiHow better. By continuing to use our site, you agree to our [cookie policy](https://www.wikihow.com/wikiHow:Cookie-Policy). ![Jack Lloyd](https://www.wikihow.com/images/thumb/f/f9/Jack-Lloyd.png/-crop-100-100-100px-Jack-Lloyd.png) Written by: [Jack Lloyd](https://www.wikihow.com/Author/Jack-Lloyd) wikiHow Technology Writer Click a star to vote Co-authors: 7 Updated: December 23, 2024 Views: 235,115 ### Quizzes & Games [![The Paperclip Challenge: Can You Outsmart the Detective?](https://www.wikihow.com/images/thumb/1/1d/Hide-Things-from-Parents-Step-1-Version-6.jpg/-crop-127-140-127px-Hide-Things-from-Parents-Step-1-Version-6.jpg.webp) The Paperclip Challenge: Can You Outsmart the Detective?![](https://www.wikihow.com/images/thumb/1/1d/Hide-Things-from-Parents-Step-1-Version-6.jpg/-crop-127-140-127px-Hide-Things-from-Parents-Step-1-Version-6.jpg)Play](https://www.wikihow.com/Generator/Hide-a-Paperclip-Game) [![Am I Smart Quiz](https://www.wikihow.com/images/thumb/a/a2/Am_i_smart_quiz.png/-crop-127-140-127px-Am_i_smart_quiz.png.webp) Am I Smart Quiz![](https://www.wikihow.com/images/thumb/a/a2/Am_i_smart_quiz.png/-crop-127-140-127px-Am_i_smart_quiz.png)Take Quiz](https://www.wikihow.com/Am-I-Smart) [![Guess the Language Quiz](https://www.wikihow.com/images/thumb/6/69/Teach-Adults-a-Foreign-Language-Step-1.jpg/-crop-127-140-127px-Teach-Adults-a-Foreign-Language-Step-1.jpg.webp) Guess the Language Quiz![](https://www.wikihow.com/images/thumb/6/69/Teach-Adults-a-Foreign-Language-Step-1.jpg/-crop-127-140-127px-Teach-Adults-a-Foreign-Language-Step-1.jpg)Take Quiz](https://www.wikihow.com/Guess-the-Language) [![IQ Test](https://www.wikihow.com/images/thumb/5/5d/Iq_test.png/-crop-127-140-127px-Iq_test.png.webp) IQ Test![](https://www.wikihow.com/images/thumb/5/5d/Iq_test.png/-crop-127-140-127px-Iq_test.png)Take Quiz](https://www.wikihow.com/IQ-Test) ### You Might Also Like [![Move from Windows to Linux](https://www.wikihow.com/images/thumb/c/cf/Move-from-Windows-to-Linux-Step-8-Version-3.jpg/-crop-127-140-127px-Move-from-Windows-to-Linux-Step-8-Version-3.jpg.webp) How to Switch from Microsoft Windows to Linux![](https://www.wikihow.com/images/thumb/c/cf/Move-from-Windows-to-Linux-Step-8-Version-3.jpg/-crop-127-140-127px-Move-from-Windows-to-Linux-Step-8-Version-3.jpg)](https://www.wikihow.com/Move-from-Windows-to-Linux) [![Transfer Files from One Linux Server to Another](https://www.wikihow.com/images/thumb/e/e9/Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg/-crop-127-140-127px-Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg.webp) How to Transfer Files from One Linux Server to Another![](https://www.wikihow.com/images/thumb/e/e9/Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg/-crop-127-140-127px-Transfer-Files-from-One-Linux-Server-to-Another-Step-3-Version-4.jpg)](https://www.wikihow.com/Transfer-Files-from-One-Linux-Server-to-Another) [![Move Files in Ubuntu](https://www.wikihow.com/images/thumb/e/eb/Move-Files-in-Ubuntu-Step-9.jpg/-crop-127-140-127px-Move-Files-in-Ubuntu-Step-9.jpg.webp) How to Move Files in Ubuntu![](https://www.wikihow.com/images/thumb/e/eb/Move-Files-in-Ubuntu-Step-9.jpg/-crop-127-140-127px-Move-Files-in-Ubuntu-Step-9.jpg)](https://www.wikihow.com/Move-Files-in-Ubuntu) [![Copy Files in Command Prompt](https://www.wikihow.com/images/thumb/f/f2/Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg/-crop-127-140-127px-Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg.webp) How to Copy Files in Command Prompt![](https://www.wikihow.com/images/thumb/f/f2/Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg/-crop-127-140-127px-Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg)](https://www.wikihow.com/Copy-Files-in-Command-Prompt) ### Trending Articles [![Am I a Princess, Angel, Supermodel, or Baddie?](https://www.wikihow.com/images/thumb/c/c7/Quiz-angel-princess-model-baddie.png/-crop-127-140-127px-Quiz-angel-princess-model-baddie.png.webp) Am I a Princess, Angel, Supermodel, or Baddie?![](https://www.wikihow.com/images/thumb/c/c7/Quiz-angel-princess-model-baddie.png/-crop-127-140-127px-Quiz-angel-princess-model-baddie.png)](https://www.wikihow.com/Am-I-a-Princess,-Angel,-Supermodel-or-Baddie) [![Tell if Your Boyfriend Is Gay](https://www.wikihow.com/images/thumb/0/09/Tell-if-Your-Boyfriend-Is-Gay-Step-14.jpg/-crop-127-140-127px-Tell-if-Your-Boyfriend-Is-Gay-Step-14.jpg.webp) How to Tell if Your Boyfriend Is Gay![](https://www.wikihow.com/images/thumb/0/09/Tell-if-Your-Boyfriend-Is-Gay-Step-14.jpg/-crop-127-140-127px-Tell-if-Your-Boyfriend-Is-Gay-Step-14.jpg)](https://www.wikihow.com/Tell-if-Your-Boyfriend-Is-Gay) [![Am I a Rizzy Sigma?](https://www.wikihow.com/images/thumb/6/6f/Rizz_sigma.png/-crop-127-140-127px-Rizz_sigma.png.webp) Am I a Rizzy Sigma?![](https://www.wikihow.com/images/thumb/6/6f/Rizz_sigma.png/-crop-127-140-127px-Rizz_sigma.png)](https://www.wikihow.com/Am-I-a-Rizzy-Sigma) [![Which Italian Brainrot Am I Quiz](https://www.wikihow.com/images/thumb/c/cd/Live-with-a-Pug-Dog-Step-4-Version-3.jpg/-crop-127-140-127px-Live-with-a-Pug-Dog-Step-4-Version-3.jpg.webp) Which Italian Brainrot Am I Quiz![](https://www.wikihow.com/images/thumb/c/cd/Live-with-a-Pug-Dog-Step-4-Version-3.jpg/-crop-127-140-127px-Live-with-a-Pug-Dog-Step-4-Version-3.jpg)](https://www.wikihow.com/Which-Italian-Brainrot-Animal-Are-You) [![wikiHow](https://www.wikihow.com/skins/owl/images/wikihow_logo_intl.png)](https://www.wikihow.com/Main-Page) - [Categories](https://www.wikihow.com/Special:CategoryListing "Special:CategoryListing") - [Computers and Electronics](https://www.wikihow.com/Category:Computers-and-Electronics "Category:Computers and Electronics") - [Operating Systems](https://www.wikihow.com/Category:Operating-Systems "Category:Operating Systems") - [Linux](https://www.wikihow.com/Category:Linux "Category:Linux") wikiHow Newsletter You're all set\! Helpful how-tos delivered to your inbox every week\! [Sign me up\!](https://www.wikihow.com/Copy-Files-in-Linux) By signing up you are agreeing to receive emails according to our privacy policy. - [Home](https://www.wikihow.com/Main-Page "Main Page") - [About wikiHow](https://www.wikihow.com/About-wikiHow "About wikiHow") - [Experts](https://www.wikihow.com/Experts) - [Jobs](https://www.wikihow.com/wikiHow:Jobs "wikiHow:Jobs") - [Contact Us](https://www.wikihow.com/wikiHow:Contact-Us "wikiHow:Contact Us") - [Site Map](https://www.wikihow.com/Special:Sitemap "Special:Sitemap") - [Terms of Use](https://www.wikihow.com/wikiHow:Terms-of-Use "wikiHow:Terms of Use") - [Privacy Policy](https://www.wikihow.com/wikiHow:Privacy-Policy "wikiHow:Privacy Policy") - [Do Not Sell or Share My Info](https://www.wikihow.com/Copy-Files-in-Linux) - [Not Selling Info](https://www.wikihow.com/Copy-Files-in-Linux) - [Contribute](https://www.wikihow.com/wikiHow:Contribute) - [Privacy & Cookie settings](https://www.wikihow.com/Copy-Files-in-Linux) Follow Us × Keep up with tech in just 5 minutes a week\! [Subscribe](https://www.wikihow.com/Copy-Files-in-Linux) You're all set\! [X](https://www.wikihow.com/Copy-Files-in-Linux) #### Join us in our mission For over two decades, we’ve been on a mission: to help everyone in the world learn how to do anything. Our articles are human written and expert endorsed to ensure readers like you get reliable, current information. **Before you get back to learning, we would be grateful if you could take a minute to support wikiHow. Any amount helps. Thank you.** [Let’s do this\!](https://www.wikihow.com/wikiHow:Contribute?utm_source=wikihow&utm_medium=banner&utm_campaign=contribute2&aid=1194873) \- \- ![](https://sb.scorecardresearch.com/p?c1=2&c2=8003466&cv=3.9.1&cj=1) 513 1 ACCOUNT 2 PAYMENT 3 CONFIRMATION ### ORDER SUMMARY \$ *** \$ Total Due Today Please select a payment method: Processing payment... 1 ACCOUNT 2 PAYMENT 3 CONFIRMATION ### Sign Up ALREADY HAVE AN ACCOUNT?[LOG IN]() Continue with Social login does not work in incognito and private browsers. Please create an account to continue. [Facebook]()[Google]() Create an account or 1 ACCOUNT 2 PAYMENT 3 CONFIRMATION ### Log in DON'T HAVE AN ACCOUNT?[SIGN UP]() Social login does not work in incognito and private browsers. Please log in with your username or email to continue. [Facebook]()[Google]() or 1 ACCOUNT 2 PAYMENT 3 CONFIRMATION Finish Account Setup Please enter an email address to finish setting up your account: ## Save this image in high definition. Download your own high definition file of this image so you can save, print, and use it anywhere. ### One-time purchase - Get the HD PNG version of this image. - Full resolution. Ideal for printing and sharing. - Yours to keep forever. By continuing, you agree to our [Terms of Service](https://www.wikihow.com/wikiHow:Terms-of-Use) and [Privacy Policy](https://www.wikihow.com/wikiHow:Privacy-policy). For personal, non-commercial use only. Questions? Please contact support@wikihow.pro. ## Thank You We've emailed you a copy of your image, and you can also download it below. [Download HD Image](https://www.wikihow.com/Copy-Files-in-Linux) By continuing to use wikiHow, you agree to our [Terms of Service](https://www.wikihow.com/wikiHow:Terms-of-Use) and [Privacy Policy](https://www.wikihow.com/wikiHow:Privacy-Policy). wikiHow Pro is intended only for your personal, non-commercial use. wikiHow, Inc. reserves the right to terminate subscriptions to wikiHow Pro at any time and for any reason. Questions? Please contact [support@wikihow.pro](mailto:support@wikihow.pro). Something went wrong [Dismiss]()
Readable Markdown
[![PDF download](https://www.wikihow.com/extensions/wikihow/socialstamp/images/icon-pdf.svg) Download Article](https://www.wikihow.com/Copy-Files-in-Linux) Copy and paste a file in Linux with this handy guide [![PDF download](https://www.wikihow.com/extensions/wikihow/socialstamp/images/icon-pdf.svg) Download Article](https://www.wikihow.com/Copy-Files-in-Linux) - [Using the Command Line](https://www.wikihow.com/Copy-Files-in-Linux#Using-the-Command-Line) - [Using the Interface](https://www.wikihow.com/Copy-Files-in-Linux#Using-the-Interface) - [Video](https://www.wikihow.com/Copy-Files-in-Linux#Video) - [Q\&A](https://www.wikihow.com/Copy-Files-in-Linux#qa_headline) - [Tips](https://www.wikihow.com/Copy-Files-in-Linux#tips) - [Warnings](https://www.wikihow.com/Copy-Files-in-Linux#warnings) This wikiHow teaches you how to copy and paste a file on a Linux computer. The command line can be used to copy and paste files, or you can use the keyboard shortcuts or your computer's right-click function if you're using a version of Linux that has a user interface. ## Things You Should Know - Open the Terminal by pressing `Alt`\+`Ctrl`\+`T` on most Linux versions. - Type in `cd path` where "path" is the address of the folder in which the file you want to copy is located. - Type the "copy" tag `cp` followed by a file's name and extension. 1. Click or double-click the Terminal app icon, which usually resembles a black box with a white "\>\_" on it. - You can also just press `Alt`\+`Ctrl`\+`T` to open Terminal on most Linux versions. 2. Type in `cd path` where "path" is the address of the folder in which the file you want to copy is located, then press `↵ Enter`. - For example, to tell Terminal to look for your file in the Desktop folder, you would type `cd Desktop` into Terminal. - Make sure you capitalize the folder's name if necessary. - If attempting to switch to a folder results in an error, you'll need to enter the folder's entire path (e.g., `/home/name/Desktop/folder` instead of just `folder`) here. Advertisement 3. This tag is `cp` with a space after it. 4. Type in the name and extension of the file you want to copy after `cp` and the space, then add a space. - For example, if you want to copy a file named "hello", you would type `cp hello` into Terminal. - If the file name has an extension on the end of it (e.g., ".desktop"), make sure you include the extension in the file's name when typing it into Terminal. 5. Type in the path for the folder into which you want to copy the file. - For example, if you want to copy "hello" into a folder named "Hi" that's stored in the Documents folder, you would have `cp hello /home/name/Documents/Hi` (where "name" is your username) typed into Terminal. 6. Doing so will run your command. Your file will be pasted into the folder you specified. 1. As with virtually all operating systems that have user interfaces, you can use keyboard shortcuts to copy and paste files on Linux: - Click the file you want to copy to select it, or drag your mouse across multiple files to select them all. - Press `Ctrl`\+`C` to copy the files. - Go to the folder into which you want to copy the files. - Press `Ctrl`\+`V` to paste in the files. 2. Go to the location in which the file is located. 3. Click once the file to do so. 4. Doing so will prompt a drop-down menu. - Some Linux versions will also display a menu bar at the top of the screen. If so, you can click **Edit** instead of right-clicking the selected file. 5. It's in the drop-down menu. This copies the selected file. - You may click **Copy...** or **Copy File** on some versions of Linux. 6. Find the folder into which you want to paste the file. 7. This will create a drop-down menu in the folder. 8. It's in the drop-down menu. Doing so pastes in your copied file. Search [Add New Question]() - Question What option will allow me to copy the contents of /dir1 to /dir2 while preserving the modification times, ownership, and permissions? ![Community Answer](https://www.wikihow.com/images/thumb/f/f5/CommunityAvatar4.png/-crop-104-104-104px-CommunityAvatar4.png) Community Answer You can try "-a" for an archive to preserve as much as possible. You can also do "--preserve" followed by a comma-separated list of attributes to preserve (or "--preserve all"). Finally, try "cp --help" or "man cp" for more options. Ask a Question 200 characters left Include your email address to get a message when this question is answered. [Submit]() Advertisement ## Video - If you want to move a file to a different folder rather than copying the file, you can type **mv** instead of **cp** when specifying the file's name and its destination (e.g., **mv hello Documents**). Thanks - Holding down `Ctrl` while clicking individual files will select each file you click. Right-clicking one of the selected files and selecting **Copy** will then copy all of the selected files. Thanks Thanks for submitting a tip for review\! Advertisement - Not all versions of Linux have a user interface. If your version of Linux has only a command line, you'll need to use the "cp" command to copy your files. Thanks Advertisement About This Article Thanks to all authors for creating a page that has been read 235,115 times. ## Is this article up to date? Keep up with tech in just 5 minutes a week\! [Subscribe](https://www.wikihow.com/Copy-Files-in-Linux) You're all set\! [X](https://www.wikihow.com/Copy-Files-in-Linux) For over two decades, we’ve been on a mission: to help everyone in the world learn how to do anything. Our articles are human written and expert endorsed to ensure readers like you get reliable, current information. **Before you get back to learning, we would be grateful if you could take a minute to support wikiHow. Any amount helps. Thank you.** \- \- ![](https://sb.scorecardresearch.com/p?c1=2&c2=8003466&cv=3.9.1&cj=1)
Shard92 (laksa)
Root Hash12431216878206919092
Unparsed URLcom,wikihow!www,/Copy-Files-in-Linux s443