Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

The screenshots and steps in this article were taken from Windows 11 and Ubuntu (for the Linux section). If you perform the steps in Windows 10, there may be slight variations in what you see.

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

  1. Right-click the Windows Start menu and select “File Explorer.”
configure File Explorer to unhide extensions of known file types - step 1
  1. Then, on the top of the Windows 11 File Explorer, click the menu (3 dots) and select Options.
Then, on the top of the Windows 11 File Explorer, click the menu (3 dots) and select Options
  1. When the File Explorer Options open, click the View tab, then uncheck “Hide extensions of known file types.” Click OK to save your changes.
When the File Explorer Options open, click the View tab, then uncheck hide extensions of known file types

After completing this step, Windows will now display all file extensions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 2: Change the Extension of a File

  1. 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.”
Right-click the file you want to modify its extension and select Show more options, then select Rename
  1. 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.
DO NOT replace the period (“.”) between the file name and its extension
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
Excel Shortcuts Keys Mouse Pad | Commands for Windows Keyboard | Non-Slip Rubber Base | Cheat Sheet | Office Computers & Laptops | Size 9.25"L x 7.75"W
  • 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
Step 3 - Revert File Explorer File Extension Settings

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
Synerlogic (10pcs) Windows PC Reference Keyboard Shortcut Sticker | Vinyl, Laminated Windows Shortcut Sticker for PC Laptop or Desktop | Shortcuts Cheat Sheet (Black/Small/10)
  • 💻✔️ 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.
The command modifies the extension of the file I changed in the last section from Servers.dll to Servers.txt
Get-ChildItem D:\reports -Recurse -Include Servers.dll | Rename-Item -NewName Servers.txt
Change File Extension in Windows with PowerShell 1
Change File Extension in Windows with PowerShell 2
Change File Extension in Windows with PowerShell
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

All you require is the mv command. Here is the basic syntax of this command:

Also popular on Amazon
Synerlogic (10pcs) Windows PC Reference Keyboard Shortcut Sticker | Vinyl, Laminated Windows Shortcut Sticker for PC Laptop or Desktop | Shortcuts Cheat Sheet (Black/Large/10)
  • 💻✔️ 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.

The command below changes the extension of the text file, Servers.txt to Servers.sh. Before running the command, I changed directory to the location of the file. Also, to show the file extension before and after, I ran the “ls” command.
mv Servers.txt Servers.sh
Change File Extension on Linux with mv Command

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
KETNOTE Keyboard Decals Shortcuts are Compatible with Apple
  • 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.
Change File Extension on Linux GUI

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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!

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of November 19, 2026 6:09 pm GMT.