Linux
linuxlinux-commandsReferenceBeginner
Move & Rename Files (mv)
Move and rename files and directories in Linux and Unix terminal environments.
Verified: 2026-09-30
Tested on:linux Ubuntu 24.04 / Debian 12
Platforms:
linuxmacos
#linux#mv#files#rename#cli
Command
mv source_file destination_file
Short Description
mv moves or renames files and directories. In Linux, renaming a file is technically moving it to a new name within the directory table.
Examples
1. Rename a File
mv draft.md published.md2. Move File to Another Directory
mv bundle.js public/dist/3. Move Multiple Files at Once
mv *.png *.jpg public/images/4. Do Not Overwrite Existing Destination (-n)
mv -n incoming_data.json data.json