Bash and terminal command

linux zvevqx 2025-11-22

👾 MOST OF THIS PAGE IS DIRECT OUTPUT OF CHATGPT 3.5

Basic Bash Commands for Navigating a File System

Here are some of the basic Bash commands you can use to navigate a file system:

  1. pwd: Displays the current working directory.
  2. cd: Changes the current working directory.
  3. cd <directory-name>: Changes to the specified directory.
  4. cd ..: Changes to the parent directory.
  5. cd /: Changes to the root directory.
  6. cd ~: Changes to the home directory.
  7. ls: Lists the contents of the current directory.
  8. ls <directory-name>: Lists the contents of the specified directory.
  9. ls -l: Lists the contents of the current directory in long format.
  10. ls -a: Lists all contents of the current directory, including hidden files.
  11. mkdir: Creates a new directory.
  12. mkdir <directory-name>: Creates a new directory with the specified name.
  13. touch: Creates a new file.
  14. touch <file-name>: Creates a new file with the specified name.
  15. cp: Copies a file or directory.
  16. cp <source> <destination>: Copies the file or directory from the source to the destination.
  17. mv: Moves a file or directory.
  18. mv <source> <destination>: Moves the file or directory from the source to the destination.
  19. rm: Deletes a file or directory.
  20. rm <file-name>: Deletes the specified file.
  21. rm -r <directory-name>: Deletes the specified directory and its contents.

These are just a few of the basic Bash commands you can use to navigate a file system. As you become more familiar with these commands, you can start to use more advanced commands to perform more complex tasks.