How to Copy Files in Linux
Method 1 of 2:
Using the Command Line
- 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.
- 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.
- Type in the "copy" tag. This tag is cp with a space after it.
- 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.
- 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.
- Press ↵ Enter. Doing so will run your command. Your file will be pasted into the folder you specified.
Method 2 of 2:
Using the Interface
- 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.
- Find the file you want to copy. Go to the location in which the file is located.
- Select the file. Click once the file to do so.
- 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.
- 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.
- Go to the destination folder. Find the folder into which you want to paste the file.
- Right-click an empty space. This will create a drop-down menu in the folder.
- Click Paste. It's in the drop-down menu. Doing so pastes in your copied file.
4 ★ | 1 Vote
You should read it
- How to Copy a DVD Onto a Computer
- Add Copy to folder and Move to folder in the right-click menu
- Copying file and folder paths in File Explorer is now much simpler on Windows 11
- How to Hide a File or Folder from Search Results in Microsoft Windows
- How to Zip Folder on Windows
- What is a folder The concept of a file (File) and a folder (Folder) in a computer
- How to Select Folders to Sync with Copy on Windows
- How to Copy Files in Command Prompt
May be interested
- How to Share Files Between Linux Computers Using NFSnearly all linux distributions come with the ability to set up a network file system (nfs) that allows the different linux computers on the network to easily share files. nfs is only suitable for networks comprised entirely of linux...
- How to Unrar Files in Linuxroshal archive (rar) is a file format designed to compress and archive data. once you download rar files from the internet, you need a program that will extract them – unpack or unrar them. since this program doesn't come pre-installed in m...
- How to Install Java on Linuxthis wikihow teaches you how to install the latest version of the java runtime environment (jre) on a computer running linux. open the [https://www.java.com/en/download/linux_manual.jsp java for linux download page]. you'll see several...
- How to Use Wine on Linuxthis wikihow teaches you how to install and run wine on a linux computer. wine is a program that allows you to run windows applications on a non-windows computer. open the terminal. select the terminal application from your computer's menu...
- How to Install Tor on Linuxthis wikihow teaches you how to download and install the tor browser on your linux computer. open the tor website. go to https://www.torproject.org/projects/torbrowser.html in your web browser. this is where you'll download the tor setup...
- How to Install XAMPP on Linuxthis wikihow teaches you how to install and run xampp on a linux computer. open the xampp download page. go to https://www.apachefriends.org/index.html in your computer's web browser. this is the official download site for xampp.