1. File & Directory Commands

These are the foundational commands for navigating and managing the file system.

  1. ls: Lists files and directories. ls -l shows a long-format list with permissions.

    WhatsApp Image 2025-08-23 at 19.27.46_82e9ffea.jpg

  2. cd: Changes the current directory. cd .. moves up one level. cd ~ goes to the home directory.

    WhatsApp Image 2025-08-23 at 19.07.57_24256132.jpg

  3. pwd: Prints the full path of the current working directory.

  4. mkdir: Creates a new directory.

  5. rmdir: Removes an empty directory.

  6. touch: Creates a new, empty file or updates the timestamp of an existing file.

  7. cp: Copies files or directories.

  8. mv: Moves or renames a file or directory.

  9. rm: Removes (deletes) files or directories. rm -rf is a powerful and dangerous command to force-delete a directory and its contents recursively.

  10. find: Searches for files in a directory hierarchy.


2. File Content & Editing

These commands are for viewing and modifying the content of files.

  1. cat: Concatenates and displays file content. It's often used to quickly view small files.
  2. less: A file pager that lets you view file content one screen at a time, allowing you to scroll both up and down.
  3. more: Similar to less, but with more limited scrolling functionality (typically only scrolls forward).
  4. head: Displays the first 10 lines of a file by default.