---
title: "How to copy a file in Linux?"  
description: "How to copy a file in Linux?"  
author: "Mukul Goenka"  
published: 2022-04-15  
canonical: https://answers.mindstick.com/qa/96831/how-to-copy-a-file-in-linux  
category: "troubleshooting"  
tags: ["troubleshooting", "linux"]  
reading_time: 1 minute  

---

# How to copy a file in Linux?

How to [copy](https://www.mindstick.com/forum/158787/what-are-rust-s-copy-and-clone-traits-and-when-are-they-used) a [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp) in Linux?

## Answers

### Answer by Hitesh Vohra

![How to copy a file in Linux?](https://answers.mindstick.com/questionanswer/e1c14c51-d3f3-41b5-a077-1460e3d0413d/images/adeb8cee-0f51-4357-a18c-820a09ba4611.png)\

- The cp command in [**Linux**](https://answers.mindstick.com/qa/96812/what-is-linux-kernel-is-it-legal-to-edit-linux-kernel) is used **to copy files** and directories to a new location. To copy a file, type 'cp' and the name of the file you want to copy. After that, specify where the new file should be saved. It's not necessary for the new file to have the same name as the one you're copying.
- cp [source] [destination]
- The file or folder you intend to relocate is referred to as the 'source.' The target directory to which you want to move that file or folder is called 'destination.'
- The source file will be copied into the destination file if 'source' and 'destination' are both files. If you give multiple files or directories as the 'source,' the 'destination' must be a folder that can hold those files and directories.

\

**Read More: [What is the minimum number of disk partitions required to install Linux?](https://answers.mindstick.com/qa/96830/what-is-the-minimum-number-of-disk-partitions-required-to-install-linux)**


---

Original Source: https://answers.mindstick.com/qa/96831/how-to-copy-a-file-in-linux

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
