• Subscribe
  • How to Rename a Directory in Linux

    madhura
    3 replies
    I’m trying to rename a directory in Linux, but nothing seems to work. I tried just renaming it in the file explorer by typing a new name, but it either disappears or gives me an error. I’m thinking of copying all the contents to a new directory and deleting the old one to fix the issue. Should I also change permissions or delete some system files if it still doesn’t work?

    Replies

    Dailie Mill
    I don't know, but I'd recommend asking AI that question. You will probably get a way better and quicker answer that way.
    Ethan Samuel Bennett
    mv old_dir_name new_dir_name should do the trick! Pretty simple command but gets the job done.
    Marc-Oliver Gewaltig
    In the terminal: mv (old) (new)