How to Copy Files in Linux: 6 Steps (with Pictures)

Table of contents:

How to Copy Files in Linux: 6 Steps (with Pictures)
How to Copy Files in Linux: 6 Steps (with Pictures)
Anonim

The way to copy files in Linux depends on the version and system files. It should be possible to copy files from the command line in all versions of Linux. You can also use textual or GUI file managers.

Steps

Method 1 of 2: Command Line

All versions of Linux have command line. If you don't have a GUI to use or are already in the terminal, you can use these text commands.

Step 1. Move the files to the directory you want to copy

To move a file from the home folder to the documents folder, you must first use the "cd" command:

cd ~

Step 2. Use the copy command to move the files to the desired directory

Now that you are in the desired directory, choose the files to copy and execute the "cp" command to copy them. So if the file is called myFile.txt, the command will be:

cp myFile.txt documents

Step 3. Go to the folder to check if the copy was successful

The best way to do this is to run these commands and find your files in the list:

cd documents ls

Method 2 of 2: Graphic file managers

1194873 4 1
1194873 4 1

Step 1. Many of these file management programs copy using the Edit menu or by dragging icons from one folder to another

1194873 5 1
1194873 5 1

Step 2. Open the file manager (in Ubuntu go to "Computer" located in "Places" on the top screen) and search for the file you want to copy

1194873 6 1
1194873 6 1

Step 3. Click the file to copy

1194873 7 1
1194873 7 1

Step 4. Go to the "Edit" menu and select "Copy"

Recommended: