Ch 2 Labs

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

As part of a security sweep of your systems, you need to check to see if the /etc/hosts file has been tampered with. Complete this lab from the Terminal. In this lab, your task is to: Find out if the modified date for the /etc/hosts file is different from its creation date. Use the appropriate command that lists both modify time and creation time. Answer the questions.

stat /etc/hosts at terminal

Your company recently changed directions and decided to terminate three products. All the necessary files have been backed up, archived, and deleted. Now you need to clean up your system by removing the directories that were used to hold the product files. In this lab, your task is to complete the following: From the command line, delete the following directories from the /projects directory: heartbt heartmon heartstrng Use the ls command to verify the deletion of the directories.

1. Access the subdirectories found in the /projects directory. a. From the Favorites bar, select Terminal. b. From the Terminal prompt, type cd /projects and press Enter. 2. Remove the empty project directories. a. Type rmdir heartbt heartmon heartstrng and then press Enter. b. Type ls -l /projects and press Enter to verify the deletion of the files.

Your company uses a proprietary graphics program called Imitator. This program is stored in the /root directory. Maggie Brown (mbrown) needs to create and modify images using the Imitator program. In this lab, your task is to create a symbolic link file to /root/imitator as follows: Use imitator_link as the symbolic link name. Create the link file in /home/mbrown.

1. Create a symbolic link file to /root/imitator. a. From the Favorites bar, select Terminal. b. At the prompt, type ln -s /root/imitator /home/mbrown/imitator_link. c. Press Enter to create the symbolic link.

Someone created duplicate versions of three project documents. To avoid version control problems, you need to delete the duplicate files. When deleting the files, use the switch that will allow you to delete a file without any promptings. Complete this lab from the Terminal. In this lab, your task is to: Delete the following files from the /projects directory: darkhorse1 camouflage1 endgame1 When you are finished, use the ls command to verify the deletion.

1. Remove the duplicate files. a. From the Favorites bar, select Terminal. b. From the Terminal prompt, type cd /projects and press Enter. c. From the Terminal prompt, type rm -f darkhorse1 and press Enter. d. Type rm -f camouflage1 and press Enter. e. Type rm -f endgame1 and press Enter. f. Type ls -l to verify the deletion of the files.

Listen to simulation instructions You need to create a script file to change and export the SHELL environmental variable as the C shell. You have decided to use the vim editor to do this. In this lab, your task is to: Use vim to open a new file named /etc/pref_shell. Add the following lines to the new file: SHELL=/bin/csh export SHELL Save and close the file.

1. Use the vim text editor to open a new file. a. From the Favorites bar, select Terminal. b. From the Terminal prompt, type vim /etc/pref_shell and press Enter to open vim and create the file. 2. Add the required text to the file. a. Press the i key to enter insert mode. b. Type the following text: SHELL=/bin/csh export SHELL 3. Save and close the file. a. Press the Esc key to exit the insert mode. b. Type : to enter the command line mode. c. Type wq and press Enter to save (write) the file and exit (quit).

The White Horse project (which you, Will Adams, have been working on) is complete. Everything produced under the code name has been backed up and removed from the server. You now need to remove the White Horse directory structure from your local system. Complete this lab from the Terminal. In this lab, your task is to: Use a single command to delete the /home/wadams/wh directory and all of its contents.

1. Delete the /home/wadams/wh directory and all of its contents. a. From the Favorites bar, select Terminal. b. Type rm -rf wh at the prompt. c. Press Enter to delete the directory and all of its contents.

Will Adams (wadams) owns and maintains a database file in the /home/wadams directory called contacts.db. The file holds contact information for perspective clients. Brenda Cassini (bcassini) and Vera Edwards (vedwards) want to access and add contact information to the file to share the data among the three users. You have decided to meet their request using a hard link. In this lab, your task is to create hard link files to /home/wadams/contacts.db as follows: Create the file in the following directories: /home/bcassini /home/vedwards Use contacts_link as the name for the new hard links.

1. Create hard link files to /home/wadams/contacts.db. a. From the Favorites bar, select Terminal. b. At the prompt, type ln /home/wadams/contacts.db /home/bcassini/contacts_link and press Enter. c. Type ln /home/wadams/contacts.db /home/vedwards/contacts_link and press Enter.

You are preparing to manage a new project, which is code named White Horse. You need to prepare directories for White Horse documents. You are logged in as the wadams user. In this lab, your task is to complete the following: From the command line, create a directory called wh in /home/wadams. Also from the command line, create the following directories in /home/wadams/wh: implement plan research Use the ls command to verify the creation of the directories.

1. Create the wh directory. a. From the Favorites bar, select Terminal. b. From the Terminal prompt, type mkdir wh and press Enter. 2. Create the required subdirectories in the wh directory. a. From the Terminal prompt, type cd wh and press Enter to move to the new directory. b. Type mkdir implement and press Enter. c. Type mkdir plan and press Enter. d. Type mkdir research and press Enter. 3. Verify the creation of the directories. a. From the Terminal prompt, type ls -l /home/wadams/wh and press Enter.

You are working with the files and directories on your Linux system. Complete this lab from the Terminal. In this lab, your task is to: Locate your current working directory. Answer Question 1. View the detailed information for the /hr directory. Answer Questions 2 and 3. See if there are any hidden files in the /hr directory. Answer Question 4.

1. Find the current working directory. a. From the Favorites bar, select Terminal. b. At the prompt, type pwd and then press Enter. c. In the upper right, select Answer Questions. d. Answer Question 1. 2. View the information for the /hr directory. a. At the prompt, type ls -l / and then press Enter. b. Answer Questions 2 and 3. 3. Find the hidden folder. a. At the prompt, type ls -a /hr and then press Enter. b. Answer Question 4. c. Select Score Lab.

Listen to simulation instructions You have been having difficulties with some of your applications running properly on your Linux system. You suspect that some of your environment variables may not be configured correctly. Complete this lab from the Terminal. In this lab, your task is to: *View the value of the following environment variables: *HOME *LANG *SHELL *TERM Answer the questions.

1. Find the value of the desired environment variables. a. From the Favorites bar, select Terminal. b. From the prompt, type echo $variable and then press Enter to view what is stored in the variable. c. Repeat step 1b for each remaining variable. 2. Answer the questions. a. From the top right, select Answer Questions. b. Answer Questions 1-4. c. From the Lab Questions dialog, select Score Lab.

Peter Lacy (placy) has taken an extended leave from the company for personal reasons. However, he was working on a critical project code named White Horse with several other employees. The project leader requested that you move any White Horse documents in Peter Lacy's home directory to Brenda Cassini's (bcassini's) home directory. You're logged on as wadams. Complete this lab from the Terminal. In this lab, your task is to: Switch to the root user using 1worm4b8 for the root user password. You must have root user permissions to move other people's files. Move the following files from Peter's home directory (placy) to Brenda's home directory (bcassini). confid_wh projplan_wh Use the ls command to verify the files' new location.

1. Switch to the root user. a. From the Favorites bar, select Terminal. b. At the prompt, type su - and press Enter. c. Type 1worm4b8 as the password and press Enter. Note: You will not be able to view the password as it is being typed. 1. Move the White Horse files. a. Type cd /home/placy and then press Enter to change to Peter's home directory. b. Type mv confid_wh ../bcassini to move the file to Brenda's home directory. c. Type mv projplan_wh ../bcassini to move the file to Brenda's home directory. 3. Verify that files were moved. a. Type ls -l to verify that the files are no longer in Peter's home directory. b. Type ls -l /home/bcassini and press Enter to verify the files' new location.

In this lab, you will explore the nano editor by configuring DNS name resolution on the IT-Laptop computer. In this lab, your task is to: *Use nano to open the /etc/resolv.conf file. *Modify the file by replacing the existing nameserver information with the following information: *nameserver 163.128.78.93 *nameserver 163.128.80.93 *Save the changes made to the file.

1. Use nano to open the /etc/resolv.conf file. a. From the Favorites bar, select Terminal. b. From the Terminal prompt, type nano /etc/resolv.conf and press Enter. 2. Modify the /etc/resolv.conf file to use the new nameserver addressees. a. Use the arrow keys to move to the nameserver line you want to edit. b. Press End to move to the end of the line. c. Press Backspace to delete the existing IP address for the selected nameserver. d. Type 163.128.78.93. e. Repeat steps 2a-2d, but use 163.128.80.93 for the second nameserver IP address. 3. Save the changes made to the /etc/resolv.conf file. a. Type Ctrl + O. b. Press Enter to save the file. c. Type Ctrl + X to exit the editor.

Complete this lab from the Terminal. In this lab, your task is to: Learn the options available for the killall command. Answer Question 1. Learn the options available for the useradd command. Answer Question 2. Learn the options available for the usermod command. Answer Question 3.

1. Use the --help option to learn more about the switches that can be used for the killall command. a. From the Favorites bar, select Terminal. b. From the prompt, type killall --help and press Enter to view the help information for this command. c. From the top right, select Answer Questions. d.Answer Question 1. 2. Use the --help option to learn more about the switches for the useradd command. a. From the prompt, type useradd --help and press Enter to view the help information for this command. b. Answer Question 2. 3. Use the --help option to learn more about the switches for the usermod command. a.From the prompt, type usermod --help and press Enter to view the help information for this command. b. Answer Question 3. c. From the Lab Questions dialog, select Score Lab.

Vera Edwards (vedwards) was recently hired as a new salesperson for your company. She cannot access the files in the sales folder and has asked for your help. Although you thought you had added her to the group, you want to verify this on her system. When you arrive to help her, she tells you that she cannot find a proposal file she has written, and she would like you to help her find it. Complete this lab from the Terminal. In this lab, your task is to use grep to: Find the current members of the /etc/group named sales. Answer Question 1. Find which proposal file contains the phrase The Fluid Data. The file is either in her home directory or in one of her sub-directories. Answer Question 2.

1. Use the grep command to find the current members of the group named sales. a. From the Favorites bar, select Terminal. b. At the prompt, type grep sales /etc/group and press Enter to find lines in the /etc/group file that contain the word sales. c. From the top right, select Answer Questions. d. Answer Question 1. 2. Find which proposal file contains the phrase, The Fluid Data. a. At the prompt, type grep -r "The Fluid Data" * and then press Enter to find all files in vedwards' home directory that contain this phrase. b. Answer Question 2. c. Select Score Lab.

You have just added a custom script to change and export the SHELL environmental variable as the C shell. However, you decided to change from the C shell to tcsh. In this lab, your task is to: *Use vim to open the /etc/pref_shell file. *Modify the environmental variable line SHELL=/bin/csh to read SHELL=/bin/tcsh. *Save your changes.

1. Use the vim text editor to open the /etc/pref_shell file. a. From the Favorites bar, select Terminal. b. From the Terminal prompt, type vim /etc/pref_shell and press Enter to open the file. 2. Modify the contents of the file. a. Press i to enter edit mode. b. Move the cursor to the line SHELL=/bin/csh and insert the letter t to make the line read SHELL=/bin/tcsh. 3. Save the changes made to the file. a. Press the Esc key to exit the insert mode. b. Type : to enter the command line mode. c. Type wq and press Enter to save (write) the file and exit (quit).

You are experiencing a few issues on your Linux system that you think are related to either your terminal's environment settings or the shell being used. You need to view the files that will tell you information about your terminal. Complete this lab from the Terminal. In this lab, your task is to: View the contents of the file /root/.bash_profile. Answer Question 1. View the contents of the file /etc/shells. Answer Question 2.

1. View the contents of the /root/.bash_profile file. a. From the Favorites bar, select Terminal. b. From the prompt, type cat /root/.bash_profile and then press Enter. c. From the top right, select Answer Questions. d. Answer Question 1. 2. View the contents of the /etc/shells file. a. From the prompt, type cat /etc/shells and then press Enter. b. Answer Question 2.


संबंधित स्टडी सेट्स

Chapter 13 Sociology Terms and Topics

View Set

Professional Liability Insurance

View Set

CompTIA Security+ Cert Prep: 7 Endpoint Security Design and Implementation

View Set

Chapter 18: International Capital Budgeting

View Set

COM4803-- Module 4 Overview: Formal Third Parties; The Arbitrator

View Set