Basic Linux File System Navigation [QuickPost]
In Linux, navigating the file system using the command line is a fundamental skill. Here are some basic commands for navigation:
- ls: List the contents of a directory.
- cd: Change the current working directory.
- Example:
cd /path/to/directory
orcd ..
to move up one directory level.
- Example:
- pwd: Print the current working directory.
- mkdir: Create a new directory.
- Example:
mkdir new_directory_name
.
- Example:
- rmdir: Remove a directory (only works if the directory is empty).
- Example:
rmdir directory_name
.
- Example:
- cp: Copy files and directories.
- Example:
cp file_to_copy new_location
.
- Example:
- mv: Move (or rename) files and directories.
- Example:
mv file_to_move new_location
ormv old_file_name new_file_name
to rename.
- Example:
- rm: Remove files or directories.
- Example:
rm file_to_remove
.
- Example:
These are just a few basic commands for navigating the Linux file system. There are many more commands and options available, but these should help you get started with the basics!