iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Users and Systems admins have scenarios in which they may need to change the extension of a file. If you need to perform this common task, use one of the methods below.
Option 1: Change File Extension on Windows with File Explorer
By default, when you view files in Windows File Explorer, the extensions are hidden. Therefore, to be able to modify the extension of a file, you must first configure File Explorer to unhide extensions of known file types.
Step 1: Change File Explorer File Extension Settings
- Right-click the Windows Start menu and select “File Explorer.”

- Then, on the top of the Windows 11 File Explorer, click the menu (3 dots) and select Options.

- When the File Explorer Options open, click the View tab, then uncheck “Hide extensions of known file types.” Click OK to save your changes.

After completing this step, Windows will now display all file extensions.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Step 2: Change the Extension of a File
- Right-click the file you want to modify its extension and select “Show more options,” then select Rename. In this example, I am changing the extension of text file (“.txt”) to “.dll.”


- To change the file extension, move your mouse to the end of the current extension and replace it with the new extension. Windows will request a confirmation, select Yes.



Step 3: Revert File Explorer File Extension Settings
When you finish, it is a good idea to open File Explorer Options -> View tab and check the “Hide extensions of known file types.”
Popular on Amazon
- Displays essential Control Key Functions as well keyboard shortcuts for Formatting and Analyzing Data.
- Learn how to Format Cells, Create Tables and Charts, and access different Data Formulas.
- Durable, smooth surface optimized for mouse control and tracking
- Non-slip rubber backing prevents sliding around

Option 2: Change File Extension on Windows with PowerShell
Changing the extension of a file with PowerShell is very straightforward.
The first step is to open PowerShell as an administrator. Then, run a command like mine below.
Also popular on Amazon
- 💻✔️ EVERY ESSENTIAL SHORTCUT - With the SYNERLOGIC Windows Reference Keyboard Shortcut Sticker, you have the most important shortcuts conveniently placed right in front of you. Easily learn new shortcuts and always be able to quickly lookup commands without the need to “Google” it.
- 💻✔️ Work FASTER and SMARTER - Quick tips at your fingertips! This tool makes it easy to learn how to use your computer much faster and makes your workflow increase exponentially. It’s perfect for any age or skill level, students or seniors, at home, or in the office.
- 💻 ✔️ New adhesive – stronger hold. It may leave a light residue when removed, but this wipes off easily with a soft cloth and warm, soapy water. Fewer air bubbles – for the smoothest finish, don’t peel off the entire backing at once. Instead, fold back a small section, line it up, and press gradually as you peel more. The “peel-and-stick-all-at-once” method only works for thin decals, not for stickers like ours.
- 💻✔️ Compatible with Windows 10 AND 11.
- ⚠️📐 STICKER SIZE - This sticker measures 3" wide and 2.5" tall and designed to fit 14" and smaller laptops. We have a larger sticker (for 15.6" and up) in our store as well.
Get-ChildItem D:\reports -Recurse -Include Servers.dll | Rename-Item -NewName Servers.txt



Option 3: Change File Extension on Linux (Terminal and GUI)
Just like with PowerShell in Windows, modifying the extension of a file in Linux is pretty easy.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsAll you require is the mv command. Here is the basic syntax of this command:
Also popular on Amazon
- 💻✔️ EVERY ESSENTIAL SHORTCUT - With the SYNERLOGIC Windows Reference Keyboard Shortcut Sticker, you have the most important shortcuts conveniently placed right in front of you. Easily learn new shortcuts and always be able to quickly lookup commands without the need to “Google” it.
- 💻✔️ Work FASTER and SMARTER - Quick tips at your fingertips! This tool makes it easy to learn how to use your computer much faster and makes your workflow increase exponentially. It’s perfect for any age or skill level, students or seniors, at home, or in the office.
- 💻 ✔️ New adhesive – stronger hold. It may leave a light residue when removed, but this wipes off easily with a soft cloth and warm, soapy water. Fewer air bubbles – for the smoothest finish, don’t peel off the entire backing at once. Instead, fold back a small section, line it up, and press gradually as you peel more. The “peel-and-stick-all-at-once” method only works for thin decals, not for stickers like ours.
- 💻✔️ Compatible with Windows 10 AND 11.
- ⚠️📐 STICKER SIZE - This sticker measures 3" wide and 2.5" tall and designed to fit 14" and smaller laptops. We have a larger sticker (for 15.6" and up) in our store as well.
mv current-filename.ext current-filename.newext
To show a real-life example, I will run the mv command on the Git Bash terminal on my Windows 11 PC.
mv Servers.txt Servers.sh

If you’re wondering how to change file extension via GUI, it is quite simple as well. Right-click the file and select Rename.
Also popular on Amazon
- The Best GIFT for any occasion
- High-quality stickers for different keyboards Desktop, Laptop and Notebook. Keyboard stickers are compatible with Apple
- The Keynote stickers can easily transform your standard keyboard into a customised one within minutes, depending on your own need and preference.
- Stickers are made of high-quality non-transparent - matt vinyl, thickness - 80mkn, typographical method.
- Keynote keyboard stickers are designed to improve your productivity and to enjoy your work all the way through.

Finally, change the file’s extension and click Rename.
Recommended Free Tools

Conclusion
Modifying the extension of a file on Windows or Linux is a common exercise but it is fairly easy. In this guide, I have explained the steps to perform this task on the two Operating Systems.
Thank you for visiting our site and I hope this article met your expectations. If it did, kindly let me know by responding to the “Was this page helpful?” question below.
Finally, before you go, you may benefit from browsing our other guides on the Windows 11 How-to Guides or Linux How-to Guides page.
Quick Recap
Thanks again!

