Problem

In this hands-on project, you log in to the computer and navigate the file structure. 1...

In this hands-on project, you log in to the computer and navigate the file structure.

1. Turn on your computer. After your Linux system has been loaded, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of secret.

2. At the command prompt, type pwd and press Enter to view the current working directory. What is your current working directory?

3. At the command prompt, type cd and press Enter. At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Why or why not?

4. At the command prompt, type cd . and press Enter. At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Why or why not?

5. At the command prompt, type cd .. and press Enter. At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Why or why not?

6. At the command prompt, type cd root and press Enter. At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Where are you now? Did you specify a relative or absolute pathname to your home directory when you used the cd root command?

7. At the command prompt, type cd etc and press Enter. What error message did you receive and why?

8. At the command prompt, type cd /etc and press Enter. At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Did you specify a relative or absolute pathname to the /etc directory when you used the cd /etc command?

9. At the command prompt, type cd / and press Enter. At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Did you specify a relative or absolute pathname to the / directory when you used the cd / command?

10. At the command prompt, type cd ~user1 and press Enter. At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Which command discussed earlier performs the same function as the cd ~ command?

11. At the command prompt, type cd Desktop and press Enter (be sure to use a capital D). At the command prompt, type pwd and press Enter to view the current working directory. Did your current working directory change? Where are you now? What kind of pathname did you use here (absolute or relative)?

12. Currently, you are in a subdirectory of user1’s home folder, three levels below the root. To go up three parent directories to the / directory, type cd ../../.. and press Enter at the command prompt. Next, type pwd and press Enter to ensure that you are in the / directory.

13. At the command prompt, type cd /etc/samba and press Enter to change the current working directory using an absolute pathname. Next, type pwd and press Enter at the command prompt to ensure that you have changed to the /etc/samba directory. Next, type in the command cd ../sysconfig at the command prompt and press Enter. Type pwd and press Enter to view your current location. Explain how the relative pathname seen in the cd ../sysconfig command specified your current working directory.

14. At the command prompt, type cd ../../home/user1/Desktop and press Enter to change your current working directory to the Desktop directory underneath user1’s home directory. Verify that you are in the target directory by typing the pwd command at a command prompt and pressing Enter. Would it have been more advantageous to use an absolute pathname to change to this directory instead of the relative pathname that you used?

15. Type exit and press Enter to log out of your shell.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search