Files, directories, and navigation

  1. For our first real bash command, let's get existential. Type whoami at the prompt and press enter. (I'm going to stop telling you to press enter now.) What is happening here in terms that we covered earlier today? How does bash know what whoami means?
  2. four basic types of CLI commands:
  3. $ which whoami
  4. How can we find out where we are?
  5. What is in our current working directory?
  6. What kinds of things are they? Files, directories, links, executable files?
  7. Important Detour: to find out which flags are available, you can use a few options:
    1. the --help flag on many commands prints basic usage information
    2. the command man, passing the program name as the argument. For instance, man ls. This opens the manual page for this program, with detailed usage information.
    3. man is not available in Git Bash, but you can also type "man " into Google and view the man pages there.
  8. Detour: man pages open in something called a pager. Pagers are used to display output that won't fit in one screen. , , and will move around within the document. You can search by typing a forward slash followed by the search term and step through the search results using n. You can exit a pager by hitting q.
  9. Detour: File extensions are short suffixes to filenames that can give us a hint about what is inside of the file. For instance, .txt files contain text, .jpg files are JPEG images, and .py files are python scripts.
  10. Can we get directory listings for other directories?
  11. How do we change directories?
  12. Detour: What does .. mean?
  13. Detour: tab completion
<< Challenge 1 >> Challenge 2