i attached the questions
1. Write the command you would use to accomplish the following tasks:
1. locate the hosts file (hint: hosts file is located in the WindowsSystem32driversetc directory)
2. Display the content of the hosts file.
3. create a directory named temp
4. copy the file /etc/hosts into your new directory
5. display the content of the file you copied to your terminal (Hint: type, cat, more, etc.
6. delete the directory you created
– what is your IP address?
– what is your default gateway?
– what is your subnet mask?
• Ping Ping is a basic Internet program that lets you verify that a particular Internet address exists and can accept requests. Ping is used diagnostically to ensure that a host computer you are trying to reach is actually operating. If, for example, a user cannot ping a host, then the user will be unable to use the File Transfer Protocol (FTP) to send files to that host. Ping can also be used with a host that is operating to see how long it takes to get a response back.
1. type ping www.google.com
2. type ping 8.8.8.8. Check the output and compare it to the output of the above command. Are they different?
. 3. In the command prompt, use the -? flag on the ping command and find out what other options you have with these commands. You should notice several additional options, such as -w, -t, -n, -i.
4. type hostname
5. type uname -u
6. whoami prints the username associated with the current effective user ID.
7. Running whoami is the same as running the command id -un
. 8. type ping -n -c 1 ‘hostname‘ and study the output
9. try the option ping -n 2 <IP address>. Explain your output.
10. try ping -n 7 <IP address>. What differences do you notice between this output and the one in the previous question?


0 comments