Windows ren / rename equivalent in Linux
Renames a file or batch-renames multiple files matching a pattern.
ren / rename
mv / rename
mv / rename
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.
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.
For the broader concept behind this mapping, read Linux filesystem for Windows users.
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 option | Use |
|---|---|
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 |
rename -v | Verbose, 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.
| Distribution | Package manager / base | Equivalent command | Difference 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