cd (change directory)
The cd command is used to move between folders. You can tell it exactly which folder you want to go to (like giving it an address), or you can use shortcuts to get around. Let’s look into both the methods.
Moving around nearby folder
If you want to move into a folder that’s within the one you’re already in, you can just use its name. For instance, if you’re in your home directory and want to reach downloads.
cd [directory name]
cd Downloads
Observation
A. checking the current directory
B. using cd command to change the directory
C. observe the updated directory
Going to a Specific Folder
Imagine telling someone the full address to find your house. Similarly, you can do the same by giving the complete path to the folder. For example, you want to access the documents folder inside the username folder.
cd [directory path]
cd /home/username/documents
Observation
Considering the above directory structure, the active directory was changed from Downloads to Documents by traversing from the home directory.
File System Navigation Commands in Linux
Linux offers an alternative to the usual windows and icons. The terminal might seem different at first, relying on text commands instead of a mouse. It might seem different at first, relying on text commands instead of a mouse. But this simplicity holds immense power.
In this article, you’ll be going through a demonstration of Navigation Commands in Linux which will help in quickly navigating in the Linux file system. Let’s go through them, but before that have a short idea of the difference between Linux and Windows file systems.
File System Navigation Commands in Linux
- Difference between Windows and Linux File System
- Commonly Used File System Navigation Commands
- 1. pwd (print working directory)
- 2. ls (list files and directories)
- 3. cd (change directory)
- 4. mkdir (make directory)
- 5. rmdir (remove empty directory)
- 6. cp (copy)
- 7. mv (move)
- Additional Shortcut Tips