← All commands
Topic hub File Management
Windows Linux File Management Expanded guide File System

Windows ren / rename equivalent in Linux

Renames a file or batch-renames multiple files matching a pattern.

Windows ren / rename
→
Linux equivalents
Debian/Ubuntu same command
mv / rename
Fedora same command
mv / rename
Arch same command
mv / rename

Overview

What this command does

On Windows, "ren / rename" is used to rename files. On Linux, the closest practical mapping shown here is "mv / rename". Renames a file or batch-renames multiple files matching a pattern. This reference is grouped under File Management → File System.

Migration tip: Single file renaming uses <code>mv</code>. For <strong>batch renaming</strong> (e.g. change all .txt to .bak), use the <code>rename</code> utility which supports Perl-style patterns.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows ren / rename maps to mv / rename for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

Practical tasks

Common use cases

Rename files

Renames a file or batch-renames multiple files matching a pattern.

mv old new

Rename a single file

rename 's/.txt/.bak/' *.txt

Batch rename with pattern

rename -n 's/foo/bar/' *

Dry-run, preview only

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

mv report.txt report.bak
rename 's/.txt/.bak/' *.txt
rename -n 's/report/summary/' *

Walkthrough

Examples with explanations

# Windows: ren report.txt report.bak
mv report.txt report.bak              # rename one file

# Windows: ren *.txt *.bak  (batch)
rename 's/.txt/.bak/' *.txt         # batch rename
rename -n 's/report/summary/' *    # preview changes first

Reference

Common options and variations

Command or optionUse
mv old newRename a single file
rename 's/.txt/.bak/' *.txtBatch rename with pattern
rename -n 's/foo/bar/' *Dry-run, preview only
rename -vVerbose, show each rename

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "mv / rename" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command mv / rename Same command on this distribution.
Fedora same command mv / rename Same command on this distribution.
Arch same command mv / rename Same command on this distribution.

Keep learning

Related File Management commands