Chapter 2 Labs

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

From the command line, delete the following directories from the /projects directory:heartbtheartmonheartstrng Use the ls command to verify the deletion of the directories.

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

Use imitator_link as the symbolic link name. Create the link file in /home/mbrown.

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

Create the file in the following directories:/home/bcassini/home/vedwards Use contacts_link as the name for the new hard links.

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

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:implementplanresearch Use the ls command to verify the creation of the directories.

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

Use a single command to delete the /home/wadams/wh directory and all of its contents.

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

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.93nameserver 163.128.80.93 Save the changes made to the file.

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

Delete the following files from the /projects directory:darkhorse1camouflage1endgame1 When you are finished, use the ls command to verify the deletion.

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

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.

Find out if the modified date for the /etc/hosts file is different from its creation/birth date.From the Favorites bar, select Terminal.From the prompt, type stat /etc/hosts and press Enter. Answer the questions.From the top right, select Answer Questions.Answer all of the questions.Select Score Lab.

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.

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

View the value of the following environment variables:HOMELANGSHELLTERM Answer the questions.

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

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_whprojplan_wh Use the ls command to verify the files' new location.

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

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.

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

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.

Use the grep command to find the current members of the group named sales.From the Favorites bar, select Terminal.At the prompt, type grep sales /etc/group and press Enter to find lines in the /etc/group file that contain the word sales.From the top right, select Answer Questions.Answer Question 1. Find which proposal file contains the phrase, The Fluid Data.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.Answer Question 2.Select Score Lab.

Use vim to open a new file named /etc/pref_shell. Add the following lines to the new file:SHELL=/bin/cshexport SHELL Save and close the file.

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

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.

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

View the contents of the file /root/.bash_profile. Answer Question 1. View the contents of the file /etc/shells. Answer Question 2.

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


Set pelajaran terkait

OB ch. 12, Chapter 25: Pregnant Woman, Ricci, Kyle & Carman: Maternity and Pediatric Nursing, Second Edition: Chapter 12: Nursing Management During Pregnancy; PrepU, Fetal Assessment for Risk Factors (Exam 3), RICCI Chapter 12, Chapter 12 OB, Chapter…

View Set

Biology: Human Anatomy and Physiology

View Set

Fundamentals of Financial Planning Questions

View Set

Microbiology Chapter 6 LearnSmart

View Set