1. Home
  2. Linux
  3. Copy file from one directory to another in ubuntu linux guide

Copy file from one directory to another in Ubuntu Linux [Guide]

Are you using Ubuntu and want to know how to copy a file from one directory to another? We’ve got you covered! Follow along as we go over the many ways you can copy files in Ubuntu Linux!

Copy file from one directory to another in Ubuntu Linux

Copy file from one directory to another in Ubuntu Linux – Ubuntu file manager

If you’re an Ubuntu user, chances are you’re using the default Ubuntu desktop environment: Gnome Shell. As a result, you will have the default Ubuntu file manager, “Files.” 

To copy a file from one directory to another in the default Ubuntu file manager, start by launching the “Files” file manager. You can launch this app by searching for “Files” in the app menu. Then, follow the step-by-step instructions below.

Step 1: Find the file you wish to copy in the Ubuntu file manager. In this example, we will copy “test.txt” from the “Documents” folder.

Once you’ve found the file you wish to copy, select it with the mouse. Then, right-click on the file with the mouse to open up the right-click menu.

Step 2: Go to the folder you wish to copy the file to in the Ubuntu file manager. In this example, we will go to the “Downloads” folder.

Once inside of the folder in which you wish to copy the file, right-click on a blank space. After right-clicking on an empty space, the right-click menu will appear. Using the right-click menu, select “Paste” to paste your file.

Copy file from one directory to another in Ubuntu Linux – Kubuntu file manager

If you’re using the KDE Plasma 5 version of Ubuntu, you’re using the Dolphin file manager. To copy a file from one directory to another using Dolphin, do the following. 

First, open up the Dolphin file manager in KDE Plasma 5. To do that, search through the app menu for “Dolphin” and select the app with that name. Once the app is open, follow the step-by-step guide below to copy a file.

Step 1: Open up the folder where the file is located, which you want to copy to another directory. In this example, our file is “test.txt” and is in the “Documents” folder.

Once inside the “Documents” folder, select the file you wish to copy with the mouse. Then, right-click on it to open up the right-click menu and select the “Copy” option.

Step 2: Go to the location in which you wish to copy the file with Dolphin. In this example, we’ll go to the “Downloads” folder. 

Once inside the folder you wish to copy to, right-click on a blank space with the mouse to open up the right-click menu. Inside the right-click menu, select the “Paste” option to paste your file.

Copy file from one directory to another in Ubuntu Linux – Xubuntu file manager

If you’re a Xubuntu user, you’re going to need to use the XFCE file manager to copy a file from one directory to another. To start the process, open up the app menu and launch the XFCE File manager (Thunar). Once it is open, follow the step-by-step instructions below.

Step 1: Find the file you wish to copy in the XFCE file manager. Once you’ve found it, select the file with the mouse. In this example, we’ll work with the “test.txt” file.

Step 2: After selecting the file with the mouse, right-click on it to open up the right-click menu. Inside of the right-click menu, select “Copy.” Then, in the file manager, navigate to the location you wish to paste the file.

Right-click on an empty space to open up the right-click menu. Then, select the “Paste” option to paste your file to the new directory.

Copy file from one directory to another in Ubuntu Linux – Ubuntu Mate file manager

Those on Ubuntu Mate will need to use the Caja file manager to copy a file from one directory to another. To start, open up the app menu and launch the Caja file manager. Once it is open, follow the step-by-step instructions down below to learn how to copy files from one location to another in Ubuntu Mate.

Step 1: Go to the location where the file is that you wish to copy with Caja. Once in the location, select the file with the mouse. In this example, we’ll make a copy of “test.txt

Step 2: After selecting the file you wish to copy with the mouse, right-click on it to open up the right-click menu. Inside the right-click menu, find the “Copy” option and select it. Then, move into the folder you wish to copy the file to.

In the right-click menu, select the “Paste” button. By clicking paste, you will put the copy of the file into the new directory.

Copy file from one directory to another in Ubuntu Linux – CP command

Don’t want to use a file manager to copy files from one directory to another? Here’s how to do it in a terminal. To start, launch a terminal window by pressing Ctrl + Alt + T on the keyboard.

Once inside of the terminal, write out the location of the file you wish to copy and the location you want to copy it to. Then, press the Enter key to start the transfer.

cp /home/USERNAME/my/file/I/want/to/copy /home/USERNAME/location/to/copy/to/