How to Rename Folder Linux Step by Step Guide for Beginners

Renaming folders in Linux is a fundamental skill. Follow these methods to rename directories via command line or graphical interface.

Method 1: Using Command Line

Execute these terminal commands:

  • Open Terminal with Ctrl+Alt+T
  • Navigate to parent directory: cd /path/to/parent
  • Rename folder with mv:
    How to Rename Folder Linux Step by Step Guide for Beginners

    mv OldFolderName NewFolderName

  • Verify result: ls

Example:

To rename "Documents" to "ProjectFiles":
cd ~/Desktop
mv Documents ProjectFiles

Method 2: Using File Manager

  • Open your file manager (e.g. Nautilus, Dolphin)
  • Navigate to target folder location
  • Right-click folder → Select Rename
  • Type new name → Press Enter

Troubleshooting Tips

  • Permission denied: Prefix command with sudo (admin privileges required)
  • Folder not found: Confirm path with pwd before renaming
  • Name conflicts: Ensure no files/folders already use the new name

Important Notes:

How to Rename Folder Linux Step by Step Guide for Beginners
  • Case sensitivity matters: "Folder" ≠ "folder"
  • Special characters require escaping (use before ? [ ])
  • Spaces in names should be quoted: mv "Old Name" "New Name"

Related News