Jump to content
Register now for free to get your favorite username before it is gone! ×
  • entry
    1
  • comments
    0
  • views
    45

How to Rename Files in Ubuntu 24.04


linuxworld

22 views

Renaming files is one of the basic operations in file management in Ubuntu 24.04 LTS and learning it is essential for smooth system administration. Renaming and organizing files help you while searching for them.

There are several ways you can use to rename files in Ubuntu 24.04. However, we will walk you through some of the methods. Let’s move ahead.

Prerequisites

  • Ubuntu 24.04 instance

  • Root or an account with sudo privileges

How to Rename Files in Ubuntu 24.04

Fire up the terminal from ‘Show Apps’ or by utilizing the shortcut key ‘CTRL + ALT + T’.

Using mv command

Mv or move command can be used to rename files in Ubuntu 24.04. Following is the syntax of the command.

mv old_file new_file

Suppose your file is old_linux_world.txt and it is located in the current folder you are working on. You want to rename it to new_linux_world.txt The complete command should be as follows.

mv old_linux_world.txt new_linux_world.txt

You can verify by checking your current directory using ls command.

ls

You will notice the existence of file new_linux_world.txt.

 

https://lh7-rt.googleusercontent.com/docsz/AD_4nXd8hRr_5Y-gMLzw0ACx7yWRTcM7h6QbAeSjC39wBCp21_MaILU8V93DuhPNb5OwBiGWpyFUwRJO32kZ7_5Z0ru6Nr-6kb591KfZP8A5EQG3zM-zAo9h_Wn71bo_4zT6EYfLSBLtrnvAEm77XAxc3ozvqhKh?key=W1RmaaFIexhgL9rzaw4IZw

 

Using mmv command

Mmv command can be used to rename files in Ubuntu 24.04. It is not a built-in command. You need to first install it. Invoke the following command.

sudo apt install mmv

Wait for the installation to finish.

When you have successfully installed the mmv command, you can utilize it to rename files. The syntax of the command is as follows.

 mmv old_file new_file

Suppose you want to rename  old_linux_world.txt to new_linux_world.txt which is located in your current directory. The following command should be written on the terminal.

mmv old_linux_world.txt new_linux_world.txt

When you run ls to check the content of your current directory. You will notice that the file has been renamed.

 

https://lh7-rt.googleusercontent.com/docsz/AD_4nXd3FF5jX031XrT_ih1Mx7crg8_SXM9OmTmEv0MZHpTsb9R30IP9Wb8-M40o7br34rUlNry3PNH3j-gT2hbASwsBV3bhEzT9uOE6EkaFslNT9aQqNto0-Xs1Og2HmnID_KwbufIrwkrXKD0U5-s0-jrioES9?key=W1RmaaFIexhgL9rzaw4IZw

 

Using GUI

You can use GUI if you are not comfortable using the terminal. Renaming files with GUI is easy and straightforward.

 Go to the folder where your desired file is located. Right-click the file and then click rename. 

 

https://lh7-rt.googleusercontent.com/docsz/AD_4nXePVSm51xp_KtTT_sf2L49nb1ui9dfj0bzcgtbqK9wsZYeRndNudjo1TBlsSeDkjMLTNO-8hy91BUW5IQL-kIFDnbYuvIxkD8k4_6h-oG-E7ZGrj0gc1nX3xjgW58EuGPsj3MrF9tya2nSSp6aOGxvn_nHq?key=W1RmaaFIexhgL9rzaw4IZw


 

Type the new name with your keyboard and then click Rename when you are done.

That’s all.

Conclusion

You can rename files in Ubuntu 24.04 LTS with a terminal and GUI. For that, you can use mv or mmv commands. For GUI, open the file and right click it, and then choose Rename from the menu.

Thank you for reading the article. For more Linux how-tos and tutorials, visit Linux World.

0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy before using this site., We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.