Rename a file or directory via terminal.
Renaming a file or directory while using in the terminal is pretty easy and simple. Simply use the “mv” command adding the original file or directory followed by a space then the new name.
mv /home/user/oldname /home/user/newname