🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 146 (from laksa052)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
17 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.6 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://www.zdnet.com/article/how-to-copy-and-rename-files-from-the-linux-terminal-window/
Last Crawled2026-03-26 06:53:42 (17 days ago)
First Indexed2023-07-19 09:40:34 (2 years ago)
HTTP Status Code200
Meta TitleHow to copy and rename files from the Linux terminal window | ZDNET
Meta DescriptionCopying and renaming files on Linux is a task that can be done from within a GUI, but sometimes you just want the speed and simplicity of doing it from the terminal window. Here's how.
Meta Canonicalnull
Boilerpipe Text
PixelsEffect/Getty Images When you first start using Linux , you'll most likely be glued to the GUI. That's not only totally understandable but acceptable. There is no shame in not using the command line. In fact, you could go your entire Linux life without ever touching the terminal window. But for some tasks, the terminal is simply more efficient. The only difference to using the GUI is that you have to remember the commands to use.  Also:   How to replace Windows with Linux Mint on your PC I want to help you with this process. In fact, my goal all along is to make Linux easy to understand for the masses. As part of that effort, I like to include the command line interface (CLI) because there's so much you can do with it.  With that in mind, let's start with two very simple but handy commands for copying and renaming files. Ready to type? How to copy a file What you'll need: The only thing you'll need for this process is a running instance of Linux. It won't matter what distribution you use, as the two commands I'm going to show you are included with every version of Linux you'll encounter. 1. Open a terminal window The first thing to do is open a terminal window. To do this, open your desktop menu and either search for "terminal" or navigate through the default menu until you find the terminal listed. The name of this app will will depend on the desktop you're using.  Also:  The best Linux distros for beginners Fortunately, most desktops use fuzzy searching, so if you type terminal in the menu search field, it should appear (whether it's Konsol, Terminal, Tilex, or any number of options). The good news is most Linux terminals work the same way. 2. Copy a file Let's say you have a file named zdnet_test.txt in your home directory and you want to copy it to your Documents directory. The command for that process would be: cp ~/zdnet_test ~/Documents/ One thing to note is that ~/ is a shortcut for /home/USER (where USER is your username), so you don't have to type as much.  Also:  How to choose the right Linux desktop distribution If you were already in your home directory (which your terminal app should default to when you first open it), you could short the command to: cp zdnet_test Documents How to rename a file Let's now rename a file. 1. Renaming while copying You can rename a file, while copying it. Let's say you want to copy zdnet_test to Documents, but also rename it to zdnet.test. For that, the command would be: cp zdnet_test Documents/zdnet.test Remember, the above command would only work if you were already in your home directory, otherwise you'd need to add ~/ on both ends, like so: cp ~/zdnet_test ~/Documents/zdnet.test 2. Renaming while moving You can also rename a file when moving it. This process is almost the same as above, but you're not copying a file to another directory, you're moving it.  Also: How to enable Linux on your Chromebook This task is accomplished with the mv command. We'll stick with our example. Say, you have zdnet_test in your home directory, and you want to move it to Documents and rename it to zdnet.test at the same time. The command for this process is: mv zdnet_test Documents/zdnet.test Remember, if you're not already in your home directory, that command would be: mv ~/zdnet_tst ~/Documents/zdnet.test And that's all there is to renaming a file in Linux. This is a very basic task that you can use to get accustomed to the Linux CLI…but only if you feel the need to start broadening your understanding of the open-source operating system . Otherwise, stick to the GUI.
Markdown
X Trending - [I wore the world's first HDR10 smart glasses](https://www.zdnet.com/article/rayneo-air-4-pro-hdr10-smart-glasses-ces/) - [TCL's new E Ink tablet beats the Remarkable and Kindle](https://www.zdnet.com/article/tcl-note-a1-nxtpaper-ces/) - [Anker's new charger is one of the most unique I've ever seen](https://www.zdnet.com/article/anker-wireless-chargers-ces-2026/) - [Best laptop cooling pads](https://www.zdnet.com/home-and-office/best-laptop-cooling-pad/) - [Best flip phones](https://www.zdnet.com/article/best-flip-phone/) - [Roku TV vs Fire Stick](https://www.zdnet.com/home-and-office/home-entertainment/roku-tv-vs-fire-stick/) - [Galaxy Buds 3 Pro vs Apple AirPods Pro 3](https://www.zdnet.com/article/apple-airpods-pro-3-vs-samsung-galaxy-buds-3-pro/) - [M5 MacBook Pro vs M4 MacBook Air](https://www.zdnet.com/article/m5-macbook-pro-vs-m4-macbook-air/) - [Linux Mint vs Zorin OS](https://www.zdnet.com/article/linux-mint-vs-zorin-os-i-compared-the-two-windows-alternatives-and-heres-my-advice/) - [4 quick steps to make your Android phone run like new again](https://www.zdnet.com/article/android-phone-clear-cache-refresh-routine/) - [How much RAM does your Linux PC need](https://www.zdnet.com/article/how-much-ram-does-your-linux-pc-need-2026/) - [How to clear your Android phone cache](https://www.zdnet.com/article/how-to-clear-android-phone-cache-2026/) - [How to disable ACR on your TV](https://www.zdnet.com/home-and-office/home-entertainment/how-to-disable-acr-on-tv/) - [How to turn on Private DNS mode on Android](https://www.zdnet.com/article/how-to-turn-on-private-dns-mode-on-android-phone/) - [ZDNET Recommends](https://www.zdnet.com/zdnet-recommends/) Tech - [Gaming](https://www.zdnet.com/topic/gaming/) - [Headphones](https://www.zdnet.com/topic/headphones/) - [Laptops](https://www.zdnet.com/topic/laptops/) - [Mobile Accessories](https://www.zdnet.com/topic/mobile-accessories/) - [Networking](https://www.zdnet.com/topic/networking/) - [PCs](https://www.zdnet.com/topic/pcs/) - [Printers](https://www.zdnet.com/topic/printers/) - [Smartphones](https://www.zdnet.com/topic/smartphones/) - [Smart Watches](https://www.zdnet.com/topic/smart-watches/) - [Speakers](https://www.zdnet.com/topic/speakers/) - [Streaming Devices](https://www.zdnet.com/topic/streaming-devices/) - [Streaming Services](https://www.zdnet.com/topic/video-streaming-services/) - [Tablets](https://www.zdnet.com/topic/tablets/) - [TVs](https://www.zdnet.com/topic/tvs/) - [Wearables](https://www.zdnet.com/topic/wearables/) - [Kitchen & Household](https://www.zdnet.com/topic/kitchen-household/) - [Office Furniture](https://www.zdnet.com/topic/office-furniture/) - [Office Hardware & Appliances](https://www.zdnet.com/topic/office-hardware-appliances/) - [Smart Home](https://www.zdnet.com/topic/smart-home/) - [Smart Lighting](https://www.zdnet.com/topic/smart-lighting/) - [Yard & Outdoors](https://www.zdnet.com/topic/yard-outdoors/) Innovation - [Artificial Intelligence](https://www.zdnet.com/topic/artificial-intelligence/) - [AR + VR](https://www.zdnet.com/topic/ar-vr/) - [Cloud](https://www.zdnet.com/topic/cloud/) - [Digital Transformation](https://www.zdnet.com/topic/digital-transformation/) - [Energy](https://www.zdnet.com/topic/energy/) - [Robotics](https://www.zdnet.com/topic/robotics/) - [Sustainability](https://www.zdnet.com/topic/sustainability/) - [Transportation](https://www.zdnet.com/topic/transportation/) - [Work Life](https://www.zdnet.com/topic/work-life/) - [Accelerate your tech game Paid Content](https://www.zdnet.com/accelerate-your-tech-game/) - [How the New Space Race Will Drive Innovation](https://www.zdnet.com/topic/how-the-new-space-race-will-drive-innovation/) - [How the metaverse will change the future of work and society](https://www.zdnet.com/topic/how-the-metaverse-will-change-the-future-of-work-and-society/) - [Managing the Multicloud](https://www.zdnet.com/topic/managing-the-multicloud/) - [The Future of the Internet](https://www.zdnet.com/topic/the-future-of-the-internet/) - [The New Rules of Work](https://www.zdnet.com/topic/the-new-rules-of-work/) - [The Tech Trends to Watch in 2023](https://www.zdnet.com/topic/the-tech-trends-to-watch-in-2023/) Business - [See all Business](https://www.zdnet.com/topic/business/) - [Amazon](https://www.zdnet.com/topic/amazon/) - [Apple](https://www.zdnet.com/topic/apple/) - [Developer](https://www.zdnet.com/topic/developer/) - [E-Commerce](https://www.zdnet.com/topic/e-commerce/) - [Edge Computing](https://www.zdnet.com/topic/edge-computing/) - [Enterprise Software](https://www.zdnet.com/topic/enterprise-software/) - [Executive](https://www.zdnet.com/topic/executive/) - [Google](https://www.zdnet.com/topic/google/) - [Microsoft](https://www.zdnet.com/topic/microsoft/) - [Professional Development](https://www.zdnet.com/topic/professional-development/) - [Social Media](https://www.zdnet.com/topic/social-media/) - [SMB](https://www.zdnet.com/topic/smb/) - [Windows](https://www.zdnet.com/topic/windows/) - [How AI is transforming organizations everywhere](https://www.zdnet.com/topic/how-ai-is-transforming-organizations-everywhere/) - [The intersection of generative AI and engineering](https://www.zdnet.com/topic/the-intersection-of-generative-ai-and-engineering/) - [Software development: Emerging trends and changing roles](https://www.zdnet.com/topic/software-development-emerging-trends-and-changing-roles/) Security - [See all Security](https://www.zdnet.com/topic/security/) - [Cyber Threats](https://www.zdnet.com/topic/cyber-threats/) - [Password Manager](https://www.zdnet.com/topic/password-manager/) - [Ransomware](https://www.zdnet.com/topic/ransomware/) - [VPN](https://www.zdnet.com/topic/vpn/) - [Cybersecurity: Let's get tactical](https://www.zdnet.com/topic/cybersecurity-lets-get-tactical/) - [Securing the Cloud](https://www.zdnet.com/topic/cybersecurity-lets-get-tactical/) Advice - [Deals](https://www.zdnet.com/deals/) - [How-to](https://www.zdnet.com/how-to/) - [Product Comparisons](https://www.zdnet.com/product-comparisons/) - [Product Spotlights](https://www.zdnet.com/product-spotlights/) - [Reviews](https://www.zdnet.com/reviews/) Buying Guides - [See all Buying Guides](https://www.zdnet.com/best-products/) - [Best Samsung phones](https://www.zdnet.com/article/best-samsung-phone/) - [Best Android phones](https://www.zdnet.com/article/best-android-phone/) - [Best smart rings](https://www.zdnet.com/article/best-smart-ring/) - [Best blood pressure watches](https://www.zdnet.com/article/best-blood-pressure-watch/) - [Best headphones for sleeping](https://www.zdnet.com/article/best-headphones-for-sleeping/) - [Best robot vacuum mops](https://www.zdnet.com/home-and-office/kitchen-household/best-robot-vacuum-mop/) - [Best web hosting services](https://www.zdnet.com/article/best-web-hosting/) - [Best travel VPNs](https://www.zdnet.com/article/best-travel-vpn/) - [Best VPNs](https://www.zdnet.com/article/best-vpn/) - [Best AI image generators](https://www.zdnet.com/article/best-ai-image-generator/) - [Best AI chatbots](https://www.zdnet.com/article/best-ai-chatbot/) - [Best 75-inch TVs](https://www.zdnet.com/home-and-office/home-entertainment/best-75-inch-tv/) - [Best smartphones](https://www.zdnet.com/article/best-phone/) - [Best iPhones](https://www.zdnet.com/article/best-iphone/) - [Best MagSafe battery packs](https://www.zdnet.com/article/best-magsafe-battery/) - [Best digital notebooks](https://www.zdnet.com/article/best-smart-notebook/) - [Best TV antennas](https://www.zdnet.com/home-and-office/home-entertainment/best-tv-antenna/) - [Best TVs](https://www.zdnet.com/home-and-office/home-entertainment/best-tv/) - [Best laptops](https://www.zdnet.com/article/best-laptop/) - [Best tablets](https://www.zdnet.com/article/best-tablet/) - [Best smartwatches](https://www.zdnet.com/article/best-smartwatch/) - [Best headphones](https://www.zdnet.com/article/best-headphones/) - [Best live TV streaming services](https://www.zdnet.com/home-and-office/home-entertainment/best-live-tv-streaming-service/) [tomorrow belongs to those who embrace it today](https://www.zdnet.com/about/) - [ZDNET France](https://www.zdnet.fr/) - [ZDNET Germany](https://www.zdnet.de/) - [ZDNET Korea](https://www.zdnet.co.kr/) - [ZDNET Japan](https://japan.zdnet.com/) Go - [See all Topics](https://www.zdnet.com/topic/) - [Finance](https://www.zdnet.com/topic/finance/) - [Education](https://www.zdnet.com/topic/education/) - [Health](https://www.zdnet.com/topic/health/) - [Special Features](https://www.zdnet.com/topic/?filter=special-features) - [ZDNET In Depth](https://www.zdnet.com/in-depth/) - [ZDNET Recommends](https://www.zdnet.com/zdnet-recommends/) - [Newsletters](https://www.zdnet.com/newsletters/) - [Videos](https://www.zdnet.com/video/) - [Editorial Guidelines](https://www.zdnet.com/editorial-guidelines/) - Trending - Tech - Innovation - Business - Security - Advice - Buying Guides - More Tech Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. [Our process]() 'ZDNET Recommends': What exactly does it mean? ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing. When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers. ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via [this form](https://zdnet.zendesk.com/hc/en-us/requests/new). [Close]() [Home](https://www.zdnet.com/) [Tech](https://www.zdnet.com/topic/tech/) [Services & Software](https://www.zdnet.com/topic/services-software/) [Open Source](https://www.zdnet.com/topic/open-source/) # How to copy and rename files from the Linux terminal window Copying and renaming files on Linux is a task that can be done from within a GUI, but sometimes you just want the speed and simplicity of doing it from the terminal window. Here's how. ![jack-wallen](https://www.zdnet.com/a/img/resize/80afa2cf818051230f8f8ab53658034e8b30fe4a/2022/08/05/f03bef9a-858a-451d-bc30-8c603c2ba899/jack-wallen.jpg?auto=webp&fit=crop&frame=1&height=192&width=192) Written by [Jack Wallen, Contributing Writer](https://www.zdnet.com/meet-the-team/jack-wallen/) Contributing Writer July 19, 2023 at 2:38 a.m. PT ![Person using a laptop](https://www.zdnet.com/a/img/resize/f666b67c2a6f1f6d6c8aa2a5c63e69c1357f1570/2023/07/18/2a320e8b-37ae-4cd9-83db-b3ac76b7a046/gettyimages-1330965067.jpg?auto=webp&width=1280) PixelsEffect/Getty Images When you [first start using Linux](https://www.zdnet.com/article/the-most-important-reason-you-should-be-using-linux-at-home/), you'll most likely be glued to the GUI. That's not only totally understandable but acceptable. There is no shame in not using the command line. In fact, you could go your entire Linux life without ever touching the terminal window. But for some tasks, the terminal is simply more efficient. The only difference to using the GUI is that you have to remember the commands to use. **Also:** [**How to replace Windows with Linux Mint on your PC**](https://www.zdnet.com/article/how-to-replace-windows-with-linux-mint-on-your-pc/) I want to help you with this process. In fact, my goal all along is to make Linux easy to understand for the masses. As part of that effort, I like to include [the command line interface](https://www.zdnet.com/article/linux-101-how-to-install-applications-from-the-command-line/) (CLI) because there's so much you can do with it. With that in mind, let's start with two very simple but handy commands for copying and renaming files. Ready to type? ## How to copy a file **What you'll need:** The only thing you'll need for this process is a running instance of Linux. It won't matter what distribution you use, as the two commands I'm going to show you are included with every version of Linux you'll encounter. ## 1\. Open a terminal window The first thing to do is open a terminal window. To do this, open your desktop menu and either search for "terminal" or navigate through the default menu until you find the terminal listed. The name of this app will will depend on the desktop you're using. **Also:** [**The best Linux distros for beginners**](https://www.zdnet.com/article/best-linux-desktops-for-beginners/) Fortunately, most desktops use fuzzy searching, so if you type terminal in the menu search field, it should appear (whether it's Konsol, Terminal, Tilex, or any number of options). The good news is most Linux terminals work the same way. ## 2\. Copy a file Let's say you have a file named zdnet\_test.txt in your home directory and you want to copy it to your Documents directory. The command for that process would be: ``` cp ~/zdnet_test ~/Documents/ ``` One thing to note is that ~/ is a shortcut for /home/USER (where USER is your username), so you don't have to type as much. **Also: [How to choose the right Linux desktop distribution](https://www.zdnet.com/article/how-to-choose-the-right-linux-desktop-distribution/)** If you were already in your home directory (which your terminal app should default to when you first open it), you could short the command to: ``` cp zdnet_test Documents ``` ## How to rename a file Let's now rename a file. ## 1\. Renaming while copying You can rename a file, while copying it. Let's say you want to copy zdnet\_test to Documents, but also rename it to zdnet.test. For that, the command would be: ``` cp zdnet_test Documents/zdnet.test ``` Remember, the above command would only work if you were already in your home directory, otherwise you'd need to add ~/ on both ends, like so: ``` cp ~/zdnet_test ~/Documents/zdnet.test ``` ## 2\. Renaming while moving You can also rename a file when moving it. This process is almost the same as above, but you're not copying a file to another directory, you're moving it. **Also: [How to enable Linux on your Chromebook](https://www.zdnet.com/article/how-to-enable-linux-on-your-chromebook-and-why-you-should/)** This task is accomplished with the *mv* command. We'll stick with our example. Say, you have zdnet\_test in your home directory, and you want to move it to Documents and rename it to zdnet.test at the same time. The command for this process is: ``` mv zdnet_test Documents/zdnet.test ``` Remember, if you're not already in your home directory, that command would be: ``` mv ~/zdnet_tst ~/Documents/zdnet.test ``` And that's all there is to renaming a file in Linux. This is a very basic task that you can use to get accustomed to the Linux CLI…but only if you feel the need to start broadening your understanding of the [open-source operating system](https://www.zdnet.com/article/its-time-for-open-source-users-to-open-their-wallets/). Otherwise, stick to the GUI. #### See also [![Linux Mint 22 at work](https://www.zdnet.com/a/img/resize/6e6116bcbeadc4d9bf44642e265c673b4cf82005/2024/08/01/288a794d-61f9-42b1-ae9d-6a89f5a1d2e6/linux-mint-22-at-work.jpg?auto=webp&fit=crop&frame=1&height=238.5&width=459) How to replace Windows with Linux Mint on your PC](https://www.zdnet.com/article/how-to-replace-windows-with-linux-mint-on-your-pc/ "How to replace Windows with Linux Mint on your PC") [![curious penguins close-up](https://www.zdnet.com/a/img/resize/3a2045b0341b8a0ec9c6297f353b7b90b2f9330f/2024/08/06/32d51a95-f2c3-4dd8-b4a8-dcd7905d9466/gettyimages-521390046.jpg?auto=webp&fit=crop&frame=1&height=238.5&width=459) 5 best Linux commands for troubleshooting problems (and how I use them)](https://www.zdnet.com/article/my-5-go-to-linux-commands-for-troubleshooting-and-how-i-use-them/ "5 best Linux commands for troubleshooting problems (and how I use them)") [![The Pop!\_OS desktop.](https://www.zdnet.com/a/img/resize/649c30b7cfd82adf6404fae33fd03e014e78c457/2024/08/06/ccf9f53d-155f-4f11-9d53-82473313d6b7/popos.jpg?auto=webp&fit=crop&frame=1&height=238.5&width=459) 5 reasons why Pop!\_OS is this Linux pro's favorite distro](https://www.zdnet.com/article/5-reasons-why-pop-os-is-this-linux-pros-favorite-distro/ "5 reasons why Pop!_OS is this Linux pro's favorite distro") [![Gmail email client.](https://www.zdnet.com/a/img/resize/1b65da3b7b6282c3a8d628e498bce6baceb9a097/2024/05/01/9a1a042a-6c58-475b-bcf8-54f29fce9f57/emailhero.jpg?auto=webp&fit=crop&frame=1&height=238.5&width=459) 5 best open-source email clients for Linux (and why Geary is my go-to)](https://www.zdnet.com/article/5-best-open-source-email-clients-for-linux-and-why-geary-is-my-go-to/ "5 best open-source email clients for Linux (and why Geary is my go-to)") - [![Linux Mint 22 at work]() How to replace Windows with Linux Mint on your PC](https://www.zdnet.com/article/how-to-replace-windows-with-linux-mint-on-your-pc/ "How to replace Windows with Linux Mint on your PC") - [![curious penguins close-up]() 5 best Linux commands for troubleshooting problems (and how I use them)](https://www.zdnet.com/article/my-5-go-to-linux-commands-for-troubleshooting-and-how-i-use-them/ "5 best Linux commands for troubleshooting problems (and how I use them)") - [![The Pop!\_OS desktop.]() 5 reasons why Pop!\_OS is this Linux pro's favorite distro](https://www.zdnet.com/article/5-reasons-why-pop-os-is-this-linux-pros-favorite-distro/ "5 reasons why Pop!_OS is this Linux pro's favorite distro") - [![Gmail email client.]() 5 best open-source email clients for Linux (and why Geary is my go-to)](https://www.zdnet.com/article/5-best-open-source-email-clients-for-linux-and-why-geary-is-my-go-to/ "5 best open-source email clients for Linux (and why Geary is my go-to)") [Editorial standards](https://www.zdnet.com/editorial-guidelines/) Show Comments [Log In to Comment]() [Community Guidelines](https://www.zdnet.com/article/zdnet-community-guidelines/) ### ### Related [![gettyimages-2240460321-cropped](https://www.zdnet.com/a/img/resize/b3ea80b5ef5e54ef3070744b3fb4cef1ead34afa/2026/02/24/6e988a08-384d-4a63-aa65-fc187f2ede58/pclinuxhero.jpg?auto=webp&fit=crop&frame=1&height=128&width=128) Miss Windows 7? How I went back to basics with PCLinuxOS](https://www.zdnet.com/article/pclinuxos-linux-distro-review-comeback/) [![Zenclora](https://www.zdnet.com/a/img/resize/48604e37313c710ced478914cd720d5f0f863c80/2026/03/11/97d2ce58-1d9f-432e-8ac1-6ec52be5a131/zenclora-is-a-linux-distro-with-zero-bloat-and-unique-tools-for-efficiency.jpg?auto=webp&fit=crop&frame=1&height=128&width=128) I tried Zenclora, a hyper-fast Linux distro with no bloat - and one truly standout feature](https://www.zdnet.com/article/zenclora-fast-linux-distro-zero-bloat-special-feature/) [![GLF OS](https://www.zdnet.com/a/img/resize/429a9d3d7e32d49e1e473b4437f534ec30f12dcb/2026/03/17/852b12f1-9bea-4c73-9e60-7ec437286f54/gflhero.jpg?auto=webp&fit=crop&frame=1&height=128&width=128) I see why this Linux distro is the dream pick for gamers and content creators](https://www.zdnet.com/article/glf-os-linux-distro-perfect-for-gamers-and-content-creators/) ![Footer background image](https://www.zdnet.com/a/img/resize/63dc52c26fbff291c9b466bdd31bee7baf9312dc/2022/09/07/c9a7d0bb-7734-41d6-806a-00548beeff3a/zdnet-footer-background-2022-desktop.png?auto=webp&fit=cover&frame=1&height=1322&width=3200) [ZDNET](https://www.zdnet.com/) we equip you to harness the power of disruptive innovation, at work and at home. - [Topics](https://www.zdnet.com/topic/) - [Galleries](https://www.zdnet.com/pictures/) - [Videos](https://www.zdnet.com/video/) - [Do Not Sell or Share My Personal Information](https://www.ziffdavis.com/ztg-privacy-policy/) - [about ZDNET](https://www.zdnet.com/about/) - [Meet The Team](https://www.zdnet.com/feature/meet-the-team-us/) - [Sitemap](https://www.zdnet.com/sitemap/) - [Reprint Policy](https://www.zdnet.com/reprints/) - Join \| Log In - [Newsletters](https://www.zdnet.com/newsletters/) - [Licensing](mailto:brand_licensing@ziffdavis.com) - [Accessibility](https://www.ziffdavis.com/accessibility/) © 2026 ZDNET, A Ziff Davis company. All rights reserved. [Privacy Policy](https://www.ziffdavis.com/ztg-privacy-policy/) \| \| Cookie Settings \| [Advertise](https://cnetgroup.com/) \| [Terms of Use](https://www.ziffdavis.com/terms-of-use/)
Readable Markdown
![Person using a laptop](https://www.zdnet.com/a/img/resize/f666b67c2a6f1f6d6c8aa2a5c63e69c1357f1570/2023/07/18/2a320e8b-37ae-4cd9-83db-b3ac76b7a046/gettyimages-1330965067.jpg?auto=webp&width=1280) PixelsEffect/Getty Images When you [first start using Linux](https://www.zdnet.com/article/the-most-important-reason-you-should-be-using-linux-at-home/), you'll most likely be glued to the GUI. That's not only totally understandable but acceptable. There is no shame in not using the command line. In fact, you could go your entire Linux life without ever touching the terminal window. But for some tasks, the terminal is simply more efficient. The only difference to using the GUI is that you have to remember the commands to use. **Also:** [**How to replace Windows with Linux Mint on your PC**](https://www.zdnet.com/article/how-to-replace-windows-with-linux-mint-on-your-pc/) I want to help you with this process. In fact, my goal all along is to make Linux easy to understand for the masses. As part of that effort, I like to include [the command line interface](https://www.zdnet.com/article/linux-101-how-to-install-applications-from-the-command-line/) (CLI) because there's so much you can do with it. With that in mind, let's start with two very simple but handy commands for copying and renaming files. Ready to type? ## How to copy a file **What you'll need:** The only thing you'll need for this process is a running instance of Linux. It won't matter what distribution you use, as the two commands I'm going to show you are included with every version of Linux you'll encounter. 1\. Open a terminal window The first thing to do is open a terminal window. To do this, open your desktop menu and either search for "terminal" or navigate through the default menu until you find the terminal listed. The name of this app will will depend on the desktop you're using. **Also:** [**The best Linux distros for beginners**](https://www.zdnet.com/article/best-linux-desktops-for-beginners/) Fortunately, most desktops use fuzzy searching, so if you type terminal in the menu search field, it should appear (whether it's Konsol, Terminal, Tilex, or any number of options). The good news is most Linux terminals work the same way. 2\. Copy a file Let's say you have a file named zdnet\_test.txt in your home directory and you want to copy it to your Documents directory. The command for that process would be: ``` cp ~/zdnet_test ~/Documents/ ``` One thing to note is that ~/ is a shortcut for /home/USER (where USER is your username), so you don't have to type as much. **Also: [How to choose the right Linux desktop distribution](https://www.zdnet.com/article/how-to-choose-the-right-linux-desktop-distribution/)** If you were already in your home directory (which your terminal app should default to when you first open it), you could short the command to: ``` cp zdnet_test Documents ``` ## How to rename a file Let's now rename a file. ## 1\. Renaming while copying You can rename a file, while copying it. Let's say you want to copy zdnet\_test to Documents, but also rename it to zdnet.test. For that, the command would be: ``` cp zdnet_test Documents/zdnet.test ``` Remember, the above command would only work if you were already in your home directory, otherwise you'd need to add ~/ on both ends, like so: ``` cp ~/zdnet_test ~/Documents/zdnet.test ``` ## 2\. Renaming while moving You can also rename a file when moving it. This process is almost the same as above, but you're not copying a file to another directory, you're moving it. **Also: [How to enable Linux on your Chromebook](https://www.zdnet.com/article/how-to-enable-linux-on-your-chromebook-and-why-you-should/)** This task is accomplished with the *mv* command. We'll stick with our example. Say, you have zdnet\_test in your home directory, and you want to move it to Documents and rename it to zdnet.test at the same time. The command for this process is: ``` mv zdnet_test Documents/zdnet.test ``` Remember, if you're not already in your home directory, that command would be: ``` mv ~/zdnet_tst ~/Documents/zdnet.test ``` And that's all there is to renaming a file in Linux. This is a very basic task that you can use to get accustomed to the Linux CLI…but only if you feel the need to start broadening your understanding of the [open-source operating system](https://www.zdnet.com/article/its-time-for-open-source-users-to-open-their-wallets/). Otherwise, stick to the GUI.
Shard146 (laksa)
Root Hash14562903760851970546
Unparsed URLcom,zdnet!www,/article/how-to-copy-and-rename-files-from-the-linux-terminal-window/ s443