How to Rename Linux Directory

Greetings to all Linux enthusiasts out there! Are you struggling with renaming directories in your Linux system? Worry not, because in this article, we will guide you on how to rename Linux directory in just a few simple steps.

Step 1: Open the Terminal

The first thing you need to do is to open the terminal in your Linux system. You can do this by pressing “Ctrl+Alt+T” or by searching for “Terminal” in the search bar.

Step 2: Navigate to the Directory

Once the terminal is open, navigate to the directory that you want to rename using the “cd” command. For example, if you want to rename the directory named “old_directory” located in the home directory, you can type in the following command:

cd ~/
cd old_directory/

Step 3: Rename the Directory

After navigating to the directory, you can now rename the directory using the “mv” command. For example, if you want to rename the directory “old_directory” to “new_directory”, you can type the following command:

mv old_directory/ new_directory/

Step 4: Verify the Rename

To verify if the directory has been successfully renamed, you can use the “ls” command to list all the files and directories in the current directory. If the directory “new_directory” is listed, then the renaming process was successful.


1. Make sure that you have the proper permissions to rename the directory. You can use the “sudo” command to gain root access if necessary.
2. Always be careful when renaming directories. Make sure that you are renaming the correct directory, and double-check the spelling of the new directory name.
3. Always back up important files before renaming directories, just in case something goes wrong.


There you have it, folks! Renaming directories in Linux is a simple process that can be done in just a few steps. By following the steps mentioned in this article, you can easily rename directories in your Linux system without any hassle.We hope that this article has been helpful to you. If you have any questions or suggestions, feel free to leave a comment below. Thank you for reading, and until next time, happy Linux-ing!Sampai jumpa kembali di artikel menarik lainnya.