Standard Linux distributions don’t generally come with a rename command. You can install the rename package though. But the standard mv (move) command can be used to rename a file or directory very easily. The mv command will be available in almost all Linux.
We generally use the mv command to move a file or directory to a different location and name. We can rename a file or directory by simply moving that to the same location with different name.
$ mv old_file new_file
The above command will rename the old_file file to new_file.
We can rename a directory in exact same way. We have to just specify the folder name in place of the file name.
$ mv old_directory new_directory
The above command will rename the old_directory folder to new_directory.