You can navigate using the . and .. directories with the cd command in the terminal. Here are some examples:
Navigate to the current directory (
.):cd .This command does not change your location; it simply confirms that you are in the current directory.
Navigate to the parent directory (
..):cd ..This command moves you up one level in the directory hierarchy. For example, if you are in
/home/user/documents, running this command will take you to/home/user.Navigate to a subdirectory from the current directory: If you want to go to a subdirectory while still using
.., you can combine them. For example, if you are in/home/userand want to go to/home/user/documents, you can do:cd documentsNavigate up two levels: You can also use
..multiple times to go up more than one level. For example:cd ../..This command will take you up two levels in the directory structure.
These commands help you efficiently navigate through the file system in a terminal environment.
