Do you need to rename a directory in Linux using the command line options?
This guide is for you.
Renaming a directory in Linux is very important for different reasons. You can rename a directory in Linux bash shell using the mv command to rename and move files and directories or folders. Everything is a file under Linux operating system including folders.
Here at LinuxReels, as part of our Server Management Services, we regularly help our Customers to perform Linux related tasks.
In this context, you shall learn how to rename a directory in Linux.
In order to rename a directory in Linux is as follows:
i. Log into your Server via an SSH tool such as putty.
ii. Execute the following Linux command to rename “old_name” folder to "new_name":
mv old_name new_name
You can use full path too:
mv /home/user/old-folder-name /home/user/new-folder-name
Who We Are ?
Most prominent, efficient, and well-performing IT companies and software solutions.