Finding Files

Find the hosts files

  • find all files containing the word hosts in the /etc directory
    • hint: you may need to elevate permissions
    • hint: you may need to use wildcards (*)
    • bonus: only return files: checkout the man pages and look for the -type option
  • printout the terminal the contents of the /etc/hosts, which should be one of the files/directories you found in the last step
    • what do you think this file means?
    • hint: what is the relationship between 127.0.0.1 and the domain name localhost?

Find the passwd file

  • find the passwd file in the /etc/ directory
    • find your username in this file
      • what does it say the home directory for that user is?

Questions & Answers

What command, arguments, and options did you use to find all files containing the word hosts in the /etc directory?

CLICK FOR ANSWER

Why are the wildcards (*) necessary in the previous answer?

CLICK FOR ANSWER