main logo

What are the commands for changing Directories in CentOS?

install centos

 

In this post, we will see about change directories command cd, which is used to move from one directory to the other. CentOS is a Community Enterprise operating system which mainly focuses on the server. It is a part of Linux Operating System Distribution, and it is free to use. First, open the terminal.

Total Time Needed: 30 Minutes

Required tools:

CentOS

Steps to Change Directories commands in CentOS

Step 1 : Type the Command
Enter the title to your How To Schema

Step 2 :Move from One Directory to the Other
To move to dir1 type the command cd dir1 and press enter key.

Move to file which is in another directory- To go to file, which is on another directory, specify the path after cd. For example, you want to go to Desktop, which in the root directory from dirA. Type cd /root/Desktop and press enter key.

Step 3 : To Move One Step Back.
Type the command cd .. to move one step back to the previous directory.

Step 4: To Go to the Home Directory of the User
Type the command cd and press enter key.

Step 5: To Print the Path of the Directory that You are Working on
Type the command pwd (which means print working directory) and press enter key which will give you the path of the directory that you are currently working on.

What are the basic commands for navigating and managing directories in CentOS?

To move files and directories in CentOS, you can use the “mv” command. To navigate directories, use “cd” to change to a specific directory, “ls” to list the contents, and “pwd” to display the present working directory. Managing directories can be done with “mkdir” to create a new directory and “rmdir” to remove an empty directory.

Conclusion

Hope you understand Change Directories commands in CentOS. If you have any doubts please contact Medha Hosting. Our Linux experts will help you.
Read Here: How To Use Terminal To Reboot, Shutdown CentOS?

Rakshitha
Rakshitha
Rakshitha is a cloud hosting expert who helps businesses get the most out of their cloud services. She has experience setting up and managing cloud environments to improve performance and scalability. With her cloud certification, Rakshithe provides clear advice on how to use cloud solutions effectively for better business results.
Share
Contents

Related Articles

medhacloud logo
USA:
Medha Cloud Solutions LLC
30 N Gould St Ste R, Sheridan, WY 82801,
Phone: +1 646 775 2855

India:
Medha Cloud Solutions Private Limited
#74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

E-Mail: support@medhahosting.com
©Medha Cloud 2024. All rights reserved.