How to Copy Files on a Linux Computer: 14 Steps

Table of contents:

How to Copy Files on a Linux Computer: 14 Steps
How to Copy Files on a Linux Computer: 14 Steps

Video: How to Copy Files on a Linux Computer: 14 Steps

Video: How to Copy Files on a Linux Computer: 14 Steps
Video: Change the default gateway in linux 2024, May
Anonim

This wikiHow teaches you how to copy and paste files on a Linux computer. You can use the command line to copy and paste files. You can also take advantage of keyboard shortcuts or the right mouse click function if you're using a version of Linux that has a user interface.

Step

Method 1 of 2: Using the Command Line

Copy Files in Linux Step 1
Copy Files in Linux Step 1

Step 1. Open Terminal

Click or double-click the Terminal app icon, which looks like a black box with a white ">_" character inside.

You can also press Alt+Ctrl+T to open the Terminal app on most versions of Linux

Copy Files in Linux Step 2
Copy Files in Linux Step 2

Step 2. Open the appropriate directory

Type in cd path, where the entry "path" is the address of the folder containing the file you want to copy. After that, press Enter key.

  • For example, to instruct Terminal to search for files in the “Desktop” folder, type cd Desktop in a Terminal window.
  • Make sure you use the proper capitalization of the folder name if necessary.
  • If you cannot access the desired folder, you will need to enter the full address of the directory (eg /home/name/Desktop/folder and not just the folder).
Copy Files in Linux Step 3
Copy Files in Linux Step 3

Step 3. Type in the copy marker or " copy"

The marker is cp, with a space after it.

Copy Files in Linux Step 4
Copy Files in Linux Step 4

Step 4. Enter a file name

Type the name and extension of the file you want to copy after the cp marker and a space, then add a space.

  • For example, if you want to copy a file called "hello", type cp hello into a Terminal window.
  • If the file name contains an extension at the end (eg ".desktop"), make sure you include the extension when typing the file name in a Terminal window.
Copy Files in Linux Step 5
Copy Files in Linux Step 5

Step 5. Enter the destination folder

Type in the address of the folder where you want to copy the files.

For example, if you want to copy the file " hello " to the " Hula " folder which is stored in the " Documents” folder, type cp hello /home/name/Documents/Hula ("name" refers to your username on the computer) in the window. Terminal

Copy Files in Linux Step 6
Copy Files in Linux Step 6

Step 6. Press Enter key

The command will be executed. The file will be copied and pasted to the destination directory you specified.

Method 2 of 2: Using Interface

Copy Files in Linux Step 7
Copy Files in Linux Step 7

Step 1. Use keyboard shortcuts

As with all operating systems that have a user interface, you can use keyboard shortcuts to copy and paste files on Linux:

  • Click the files you want to copy to select them, or drag the cursor over several files to select them at the same time.
  • Press Ctrl+C to copy the file.
  • Open the folder where you want to copy the file.
  • Press Ctrl+V to paste the file.
Copy Files in Linux Step 8
Copy Files in Linux Step 8

Step 2. Locate the file you want to copy

Open the directory where you want the file to be saved.

Copy Files in Linux Step 9
Copy Files in Linux Step 9

Step 3. Select the file

Click the file once to select it.

Copy Files in Linux Step 10
Copy Files in Linux Step 10

Step 4. Right-click the file

After that, a drop-down menu will be displayed.

Some versions of Linux display a menu bar at the top of the screen. If there is a menu bar, you can click the menu “ Edit ” instead of right-clicking on the selected file.

Copy Files in Linux Step 11
Copy Files in Linux Step 11

Step 5. Click Copy

This option is in the drop-down menu. The selected files will be copied.

You may need to select " Copy… " or " Copy File ” on some versions of Linux.

Copy Files in Linux Step 12
Copy Files in Linux Step 12

Step 6. Open the copy destination folder

Find the folder where you want to paste the file.

Copy Files in Linux Step 13
Copy Files in Linux Step 13

Step 7. Right-click an empty space in the folder

A drop-down menu will appear on the folder.

Copy Files in Linux Step 14
Copy Files in Linux Step 14

Step 8. Click Paste

This option is in the drop-down menu. After that, the copied file will be pasted.

Tips

  • If you want to move the file to another folder instead of copying it, type the command “ mv" as a replacement " cp ” when you specify the filename and destination directory (eg. mv hello Docs ”).
  • Hold down the Ctrl key while clicking each file to select multiple files at the same time. After that, right-click one of the files and select “ Copy ” to copy all selected files.

Recommended: