How to Rename a File in Linux using Command
You are a beginner to the Linux commands right? No worries, it is extremely easy to rename Linux files using the terminal. All you have to do is to use the ‘mv’ command in the terminal. In this article, we are going to teach you how to use that command to rename a file in…

You are a beginner to the Linux commands right? No worries, it is extremely easy to rename Linux files using the terminal. All you have to do is to use the ‘mv’ command in the terminal. In this article, we are going to teach you how to use that command to rename a file in Linux using the terminal.
How to Rename a File in Linux using Terminal
Let’s assume that the file that you want to rename is “mydocz.pdf” and you want to rename it as “mydocs.pdf”. To rename it.
- Open the terminal by navigating to Applications > Accessories > Terminal.
- Type the following command,
cd /home/techhacker/docs/filesmv mydocz.pdf mydocs.pdfHere, in the first line, enter the location of the file. In our case, it was located in /home/techhacker/docs/files directory. Also, replace the file names with yours.
You can also write this command as,mv /home/techhacker/docs/files/mydocz.pdf /home/techhacker/docs/files/mydocs.pdf - After entering them, just press Enter and your file will be renamed instantly.
Using pyRenamer
If you are not friendly to console and looking for an alternative way, this solution is for you. pyRenamer is simple and powerful rename tool which is written Python. You can find this tool on GitHub.
pyRenamer can remove duplicate symbols from filenames, replace any string of text with another, change filenames to uppercase, lowercase or sentence case, and automatically insert or remove spaces and underscores. You can change the name of a file in the main area of the program clicking on rename.
That’s all that you have to do for renaming the files in your Linux system. It is recommended to double check all commands on the terminal especially if you are a beginner. Any mistakes in the command may cause some problems to the files if the mistake matches with some other working commands.
We hope, you got the desired results and had successfully renamed the file. If you faced any difficulties in the process, feel free to leave a comment in the following comment section. We will be happy to help you as soon as possible.
More in Linux

How to Install WebTorrent on Linux
WebTorrent is an excellent application available for cross-platforms. It works like a charm for viewing and streaming music using peer to peer Torrent protocol. The WebTorrent application is available for Linux, Mac, and Windows platforms. It is an open source torrent client built on Javascript and uses WebRTC for peer-to-peer connection support. The WebTorrent is…

Linux Add User to Group
Adding a user to a group is a fairly simple task. It is not as difficult as coding an entire program in the terminal. But most beginners are unaware of the commands and steps to do so. So, in this article on “Linux Add User to Group,” we are going to list the complete step-by-step…

How To Install New Fonts In Ubuntu
Ubuntu is a most user-friendly version of Linux and comes with a great list of fonts when you install. If you are not satisfied with the available list of fonts in Ubuntu, you can install additionally from other sources. Installing a font file on Linux is a pretty simple process. The below procedure works for…
The week in tech, minus the noise.
New reviews, fixes and the stories that matter — once a week, straight to your inbox.
We only use your email to send the newsletter. Unsubscribe any time. See our privacy policy.
Comments