Home > Articles

Using Essential Tools

In this sample chapter from Red Hat RHCSA 9 Cert Guide: EX200, you will learn Linux skills that will prepare you for the RHCSA exam, including basic shell skills, how to edit files with vim, and an understanding of the shell environment.

This chapter is from the book

This chapter is from the book

The following topics are covered in this chapter:

  • Basic Shell Skills

  • Editing Files with vim

  • Understanding the Shell Environment

  • Finding Help

The following RHCSA exam objectives are covered in this chapter:

  • Use input-output redirection (>, >>, |, 2>, etc.)

  • Access a shell prompt and issue commands with correct syntax

  • Create and edit text files

  • Locate, read, and use system documentation including man, info, and files in /usr/share/doc

This chapter is dedicated to coverage of the basic Linux skills that everyone should have before attempting to take the RHCSA exam.

“Do I Know This Already?” Quiz

The “Do I Know This Already?” quiz enables you to assess whether you should read this entire chapter thoroughly or jump to the “Exam Preparation Tasks” section. If you are in doubt about your answers to these questions or your own assessment of your knowledge of the topics, read the entire chapter. Table 2-1 lists the major headings in this chapter and their corresponding “Do I Know This Already?” quiz questions. You can find the answers in Appendix A, “Answers to the ‘Do I Know This Already?’ Quizzes and Review Questions.”

Table 2-1 “Do I Know This Already?” Section-to-Question Mapping

Foundation Topics Section

Questions

Basic Shell Skills

1, 3–7

Editing Files with vim

8

Understanding the Shell Environment

2, 9

Finding Help

10

1. Which of the following commands enables you to redirect standard output as well as standard error to a file?

  1. 1&2> file

  2. > file 2>&1

  3. >1&2 file

  4. 1>2& file

2. You want to set a local variable that will be available for every user in every shell. Which of the following files should you use?

  1. /etc/profile

  2. /etc/bashrc

  3. ~/.bash_profile

  4. ~/.bashrc

3. A user has created a script with the name myscript. The user tries to run the script using the command myscript, but it is not started. The user has verified that the script permissions are set as executable. Which of the following is the most likely explanation?

  1. An internal command is preventing the startup of the script.

  2. Users are not allowed to run scripts.

  3. The directory that contains the script is not in the $PATH variable.

  4. The script does not have appropriate permissions.

4. You need the output of the command ls to be used as input for the less command. Which of the following examples will do that for you?

  1. ls > less

  2. ls >> less

  3. ls >| less

  4. ls | less

5. A user by accident has typed a password, which now shows as item 299 in history. Which of the following do you recommend to ensure the password is not stored in history?

  1. Remove the ~/.bash_history file and type history -c.

  2. Type history -c.

  3. Remove the ~/.bash_history file.

  4. Type history -d 299.

6. Which of the following is not a valid method to repeat a command from history?

  1. Press Ctrl-r and start typing a part of the command.

  2. Type ! followed by the first letters in the command.

  3. Type ! followed by the number of the command as listed in history.

  4. Press Ctrl-x followed by the number in history.

7. For which of the following items can Bash completion be used?

  1. Commands

  2. Files

  3. Variables

  4. All of the above

8. Which of the following commands enables you to replace every occurrence of old with new in a text file that is opened with vim?

  1. :%s/old/new/g

  2. :%r/old/new/

  3. :%s/old/new/

  4. r:/old/new

9. Which approach works best if during the login process you want to show a message to all users who have just logged in to a shell session on your server?

  1. Put the message in /etc/issue.

  2. Put the message in /etc/motd.

  3. Put the message in /etc/profile.

  4. Put the message in /etc/bashrc.

10. You are using man -k user, but you get the message “nothing appropriate.” Which of the following solutions is most likely to fix this for you?

  1. Type sudo updatedb to update the mandb database.

  2. Type sudo makewhatis to update the mandb database.

  3. Type sudo mandb to update the mandb database.

  4. Use man -K, not man -k.

Foundation Topics

vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |