Are you a Red Hat Command-Line Captain? Prove your knowledge to earn your badge.
Which of the following commands in Linux® is used to display information about files and directories contained within the current working directory?
- A. pwd
- B. ls
- C. grep
- D. ps
Below are descriptions of yum commands. Which is incorrect?
- A. "yum provides /var/www/html" displays the package that provides the "/var/www/html" directory.
- B. "yum update httpd" downloads and installs an updated version of the httpd package including dependencies.
- C. "yum install httpd" downloads and installs the httpd package and all its dependencies.
- D. "yum find web" returns a list of packages with "web" in the name or summary page.
Which of the following statements is false?
- A. The rpm command can list configuration files within a package.
- B. Package file names contain this information: name, version, release, architecture.
- C. Running the command "rpm -qa" will return a syntax error.
- D. To display scripts that are associated with a "pkgname" package, run the "rpm -q --scripts pkgname" command.
Which of the following commands will display the IP address associated with the ens3 network interface?
- A. ip -s link show ens3
- B. ip -s addr ens3
- C. ip addr show ens3
- D. ip status ens3
Which of the following statements about SSH key-based authentication is false?
- A. SSH key-based authentication uses a public-private key pair to authenticate.
- B. The StrictHostChecking parameter aborts an SSH connection if the IP address of the remote host is not in the local network.
- C. You create a public-private key pair using the command ssh-keygen.
- D. SSH key-based authentication permits you to authenticate to a system without a password.
A Linux® command used for transferring files/directories to a different directory is:
- A. replace
- B. export
- C. move
- D. mv
A Linux® command displaying an absolute path to (i.e., the full filename of) the current working directory is:
- A. mv
- B. pwd
- C. rm
- D. dir
This command can be used to turn off or restart a Linux® host.
- A. reboot
- B. shutdown
- C. exit
- D. taskkill
A command in Linux® that allows to search files for lines containing a match to a given pattern is called:
- A. rm
- B. chmod
- C. find
- D. grep
Which of the following commands in Linux® is used to display information about files and directories contained within the current working directory?
- A. pwd
- B. ls
- C. grep
- D. ps