RHCSA

Ace your homework & exams now with Quizwiz!

Of the following nice values, which will increase the priority of the selected process? a. 100 b. 20 c. -19 d. -100

-19

Which option is missing (...) if you want to sort the third column of the output of the command ps aux? ps aux | sort ... a. -k3 b. -s3 c. -k f 3 d. -f 3

-k3

Which tar option enables you to add one single file to a tar archive? a. -a b. -A c. -r d. -u

-r

Which option would you use with grep to show only lines that do not contain the regular expression that was used? a. -x b. -v c. -u d. -q

-v

Which regular expression is used as a wildcard to refer to any single character? a. ? b. . c. * d. &

.

Which option is missing (...) from the following command, assuming that you want to filter the first field out of the /etc/passwd file and assuming that the character that is used as the field delimiter is a :? cut ... : -f 1 /etc/passwd a. -d b. -c c. -t d. -x

-d

Which of the following directories would typically not be mounted on its own dedicated device? a. /etc b. /boot c. /home d. /usr

/etc

Which of the following files is not processed when a user starts a login shell? a. /etc/profile b. /etc/.profile c. ~/.bashrc d. ~/.bash_profile

/etc/.profile

Which of the following is not a private IP address? a. 10.10.10.10 b. 169.254.11.23 c. 172.19.18.17 d. 192.168.192.192

169.254.11.23

Which of the following commands enables you to replace every occurrence of old with new in a text file that is opened with vi? a. :%s/old/new/g b. :%r/old/new/ c. :s/old/new/g d. r:/old/new

:%s/old/new/g

Which of the following commands enables you to redirect standard output as well as standard error to a file? a. 1&2> file b. > file 2>&1 c. >1&2 file d. 1>2& file

> file 2>&1

Which regular expression do you use to make the previous character optional? a. ? b. . c. * d. &

?

Which of the following is not generally considered a type of process? (Choose two.) a. A shell job b. A cron job c. A daemon d. A thread

A cron job; A thread

Which device file is associated with the virtual console that is opened after using the Alt-F6 key sequence? a. /dev/console6 b. /dev/tty6 c. /dev/vty6 d. /dev/pts/6

/dev/tty6

Which configuration file should you change to set the default location for all new user home directories? a. /etc/login.defaults b. /etc/login.defs c. /etc/default/useradd d. /etc/default/login.defs

/etc/default/useradd

In which configuration file would you set the hostname? a. /etc/sysconfig/network b. /etc/sysconfig/hostname c. /etc/hostname d. /etc/defaults/hostname

/etc/hostname

You are looking for a variable that is set in a Bash login shell for all users. Which of the following files is the most likely location where this variable is set? (Choose two.) a. /etc/profile b. /etc/bashrc c. ~/.bash_profile d. ~/.bashrc

/etc/profile; /etc/bashrc

Which of the following is used to store the hash of the user's encrypted password? a. /etc/passwd b. /etc/shadow c. /etc/users d. /etc/secure

/etc/shadow

Under which directory would you expect to find nonessential program files? a. /boot b. /bin c. /sbin d. /usr

/usr

Under which directory would you expect to find log files? a. /proc b. /run c. /var d. /usr

/var

When installing a server that uses LVM logical volumes, you'll get at least 3 storage volumes (partitions or LVM). Which of the following is not part of them? a. /boot b. /var c. / d. swap

/var

Which of the following umask settings meets the following requirements: - Grants all permissions to the owner of the file - Grants read permissions to the group owner of the file - Grants no permissions to others a. 740 b. 750 c. 027 d. 047

027

For which of the following items can Bash completion be used? a. Commands b. Files c. Variables d. All of the above

All of the above

Which command enables you to find all files on a system that are owned by user linda? a. find / -user linda b. find / -uid linda c. ls -l | grep linda d. ls -R | find linda

find / -user linda

Which command can be used to list all groups a user is member of? a. userlist b. grouplist c. id d. groups

id; groups

Which of the following commands is most appropriate if you're looking for detailed information about the command and how it was started? a. ps ef b. ps aux c. ps d. ps fax

ps ef

Which command enables you to find the RPM package a specific file belongs to? a. rpm -ql /my/file b. rpm -qlf /my/file c. rpm -qf /my/file d. rom -qa /my/file

rpm -qf /my/file

Which command enables you to analyze whether there are scripts in an RPM package file that you have just downloaded? a. rpm -qs packagename.rpm b. rpm -qps packagename.rpm c. rpm -qp --scripts packagename.rpm d. rpm -q --scripts packagename.rpm

rpm -qp --scripts packagename.rpm

Which of the following commands will set the current performance profile to powersave? a. tuneadm profile set powersave b. tuned-adm profile powersave c. tuneadm profile --set powersave d. tuned-adm profile --set powersave

tuned-adm profile powersave

Which is the correct term for the description here? "Used to refer to the physical screen you are currently looking at as a user" a. Terminal b. Console c. Shell d. Interface

Console

What can you do to ensure that no users, except for the user root, can log in temporarily? a. Set the default shell to /usr/sbin/nologin b. Set the default shell to /bin/false c. Create a file with the name /etc/nologin d. Create a file with the name /etc/nologin.txt

Create a file with the name /etc/nologin.txt

Which key combination enables you to cancel a current interactive shell job? a. Ctrl-C b. Ctrl-D c. Ctrl-Z d. Ctrl-Break

Ctrl-C

Which of the following commands would you use from top to change the priority of a process? a. r b. n c. c d. k

r

Which of the following shows correct syntax to change the priority for the current process with PID 1234? a. nice -n 5 1234 b. renice 5 1234 c. renice 5 -p 1234 d. nice 5 -p 1234

renice 5 -p 1234

There are different ways that users can run tasks with root permissions. Which of the following is not one of them? a. sudo b. runas c. su d. PolicyKit

runas

Which command should you use to install an RPM file that has been downloaded to your computer? a. yum install b. yum localinstall c. rpm -ivh d. rpm -Uvh

yum install

Which of the following commands allows you to install the devel profile of the PHP 7.1 application stream? a. yum module install php:7.1 devel b. yum module install php:7.1 --devel c. yum module install php:7.1/devel d. yum module install php:7.1@devel

yum module install php:7.1/devel

Which command enables you to search the package that contains the file semanage? a. yum search semanage b. yum search all semanage c. yum provides semanage d. yum whatprovides */semanage

yum whatprovides */semanage

What is the name of the file in which the public key fingerprint of the SSH servers you have connected to in the past are stored? a. /etc/ssh/remote_hosts b. /etc/ssh/known_hosts c. ~/.ssh/remote_hosts d. ~/.ssh/known_hosts

~/.ssh/known_hosts

Which command enables you to copy hidden files as well as regular files from /home/$USER to the current directory? a. cp -a /home/$USER . b. cp -a /home/$USER/* . c. cp -a /home/$USER/. . d. cp -a home/$USER. .

cp -a /home/$USER/. .

Which of the following would be the default network interface name on a RHEL 8 system? a. p6p1 b. eth0 c. eno1677783 d. e0

eno1677783

Which command grants rw permissions for the group sales to all new files that will be created in the /data directory and all of its subdirectories? a. setfacl -m d:g:sales:rw /data b. setfacl -m d:g:sales:rwx /data c. setfacl -R -m g:sales:rwx /data d. setfacl -R -m g:sales:rw /data

setfacl -m d:g:sales:rwx /data

Which command creates a symbolic link to the directory /home in the directory /tmp? a. ln /tmp /home b. ln /home /tmp c. ln -s /home /tmp d. ln -s /tmp /home

ln -s /home /tmp

Which command enables you to show all files in the current directory so that the newest files are listed last? a. ls -lRt b. ls -lrt c. ls -alrt d. ls -alr

ls -alrt

Which utility can be used to edit group membership directly through the appropriate configuration file? a. vigr b. vipw c. vipasswd d. usermod

vigr

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? a. ls > less b. ls >> less c. ls >| less d. ls | less

ls | less

Which command enables you to check all attributes that are currently set on myfile. a. ls --attr myfile b. getattr myfile c. lsattr myfile d. listattr myfile

lsattr myfile

Which command enables you to count the number of words in a text file? a. count b. list c. ls -l d. wc

wc

On a default installation of an RHEL 8 server, which group does the user typically need to be a member of to be able to use sudo to run all administration commands? a. admin b. root c. sys d. wheel

wheel

Which yum module component allows you to work with different versions side by side? a. Application profile b. Application stream c. Module version d. RPM group

Application stream

Which statement about the system language is *not* true? a. You can change the system language from the Installation Summary screen. b. You can change the system language directly after booting from the installation media. c. When setting the installation language, you can also select a keyboard layout d. After installation, you cannot change the language settings

After installation, you cannot change the language settings

Which of the following is not a recommended way to specify which DNS servers to use? a. Edit /etc/resolv.conf. b. Set the DNS options in /etc/sysconfig/network-scripts/ifcfg-<ID>. c. Set the DNS server names using nmcli. d. Use nmtui to set the DNS server names.

Edit /etc/resolv.conf.

Which of the following is not a reason why Fedora should be avoided? a. Fedora contains features that may or may not be available in future RHEL releases. b. Fedora distributions show a much later state of development than RHEL c. Fedora software is not stable d. Software in Fedora may differ from the same software in RHEL.

Fedora software is not stable

To allow graphical applications to be used through an SSH session, you can set a parameter in the /etc/ssh/ssh_config file. Using this parameter makes it unnecessary to use the -X command-line option each time an SSH session is initiated. Which of the following parameters should be used? a. Host * b. TunnelX11 yes c. ForwardX11 yes d. Xclient yes

ForwardX11 yes

Which key on your keyboard do you use in less to go to the last line of the current text file? a. End b. Page Down c. q d. G

G

Which of the following is true about GPG-based repository security? a. If packages in the repository have been signed, you need to copy the GPG key to the correct location. b. GPG package signing is mandatory. c. GPG package signatures prevent packages in a repository from being changed. d. GPG package signing is recommended on Internet repositories but not required on local repositories that are for internal use only.

GPG package signing is recommended on Internet repositories but not required on local repositories that are for internal use only.

Which of the following IP addresses belong to the same network? I. 192.168.4.17/26 II. 192.168.4.94/26 III. 192.168.4.97/26 IV. 192.168.4.120/26 a. I and II b. II and III c. III and IV d. II, III, and IV

II, III, and IV

After setting the root password that you want to use, you cannot proceed in the installation. What is the most likely reason? a. The password is unsecure, and unsecure passwords are not accepted. b. The password does not meet requirements in the password policy. c. You also need to create a user. d. If an unsecure password is used, you need to click Done twice.

If an unsecure password is used, you need to click Done twice.

Which statement about hard links is not true? a. Hard links cannot be created to directories. b. Hard links cannot refer to files on other devices. c. The inode keeps a hard link counter. d. If the original hard link is removed, all other hard links become invalid.

If the original hard link is removed, all other hard links become invalid.

Which of the following is true about remote access to Linux servers from a Windows environment? a. Open a shell terminal on Windows and type ssh to access Linux servers remotely. The ssh command is available as a default part of the Windows operating system. b. Configure Remote Access on Windows if you want to access Linux servers running the sshd process. c. Install the PuTTY program on Windows to access sshd services on Linux from Windows. d. You cannot remotely access Linux machines from Windows.

Install the PuTTY program on Windows to access sshd services on Linux from Windows.

Which statement about NetworkManager is not true? a. It is safe to disable NetworkManager and work with the network service instead. b. NetworkManager manages network connections that are applied to network interfaces. c. NetworkManager has a text-based user interface with the name nmtui. d. NetworkManager is the default service to manage networking in RHEL 8.

It is safe to disable NetworkManager and work with the network service instead.

Which of the following methods will open a pseudo terminal device? (Choose two.) a. Log in using an SSH session b. Press Alt-F2 to open a new nongraphical login c. Type terminal in the search menu and open it d. Enter your username and password on a nongraphical console

Log in using an SSH session; Type terminal in the search menu and open it

Which installation source is used on RHEL if a server is not registered with RHN? a. The installation medium is used. b. No installation source is used. c. The base RHN repository is used, without updates. d. You have full access to RHN repositories, but the software you are using is not supported.

No installation source is used.

Which of the following can be used to move a job to the background? a. Press & b. Press Ctrl-Z and then type bg c. Press Ctrl-D and then type bg d. Press Ctrl-Z, followed by &

Press Ctrl-Z and then type bg

Which of the following is not a valid method to repeat a command from history? a. Press Ctrl-r and start typing a part of the command. b. Type ! followed by the first letters in the command. c. Type ! followed by the number of the command as listed in history. d. Press Ctrl-x followed by the number in history.

Press Ctrl-x followed by the number in history.

Which statement about privileged users (root) is true? a. A privileged user is a user who has access to a Linux system. b. A privileged user with no access permissions can do nothing at all. c. Privileged users are not restricted in any way. d. On every server, at least one privileged user must be manually created while installing the server.

Privileged users are not restricted in any way.

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? a. Put the message in /etc/issue. b. Put the message in /etc/motd. c. Put the message in /etc/profile. d. Put the message in /etc/bashrc.

Put the message in /etc/motd.

A user wants to remove her complete history. Which of the following approaches would do that? a. Remove the ~/.bash_history file and type history -c. b. Type history -c. c. Remove the ~/.bash_history file. d. Type history -c and close the current shell.

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

Which is the correct term for the description here? "The environment that offers a command line on which users type the commands they want to use" a. Terminal b. Console c. Shell d. Interface

Shell

Which of the following features is availiable both in RHEL and CentOS? a. Hardware certification b. Software certification c. The right to make support calls d. Software updates.

Software updates.

Which is the correct term for the description here? "The environment from which a shell is used where users can enter their commands" a. Terminal b. Console c. Shell d. Interface

Terminal

Which feature is supported in Ext4 but not in XFS? a. The ability to shrink the file system b. Snapshots c. File system quota d. A maximum size that goes beyound 2 TB

The ability to shrink the file system

A user has created a script with the name myscript. He tries to run it 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? a. An internal command is preventing the startup of the script b. Users are not allowed to run scripts c. The directory that contains the script is not in the PATH d. The script does not have appropiate permissions

The directory that contains the script is not in the PATH

You are trying to use the setfacl command to set ACLs on the directory /data, but you are getting an "operation not supported" message. Which of the following is the most likely explanation? a. The setfacl command is not installed on your computer. b. You are making an error typing the command. c. The user or group to which you want to grant ACLs does not exist. d. The file system lacks ACL support.

The file system lacks ACL support.

You want to install a test environment to price for the RHCSA exam. Which of the following distributions should you avoid? a. The most recent Fedora version b. CentOS 8 c. Scientific Linux 8 d. RHEL 8

The most recent Fedora version

Which of the following statements are true about threads? (Choose two.) a. Threads cannot be managed individually by an administrator. b. Multithreaded processes can make the working of processes more efficient. c. Threads can be used only on supported platforms. d. Using multiple processes is more efficient, in general, than using multiple threads.

Threads cannot be managed individually by an administrator.; Multithreaded processes can make the working of processes more efficient.

Sometimes a server reboot may be necessary to accomplish a task. Which of the following is not typically one of them? a. To recover from serious problems such as server hangs and kernel panics b. To apply kernel updates c. To apply changes to kernel modules that are being used currently and therefore cannot be reloaded easily d. To apply changes to the network configuration

To apply changes to the network configuration

Why should you install the server with a GUI installation pattern? a. To prepare for the RHCSA, you need some tools that run in a GUI only. b. The minimal installation is incomplete. c. If you do not install a GUI immediately, it is hard to add it later. d. The Server with GUI is the default installation that is recommened by Red Hat

To prepare for the RHCSA, you need some tools that run in a GUI only.

Which of the following options is not availiable from the Installation Summary Screen? a. Time & Date b. Keyboard c. Language Support d. Troubleshoot an Existing Installation

Troubleshoot an Existing Installation

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? a. Type updatedb to update the mandb database. b. Type makewhatis to update the mandb database. c. Type mandb to update the mandb database. d. Use man -K, not man -k.

Type mandb to update the mandb database.

Which of the following statements about key-based SSH authentication is true? a. After creating the key pair, you need to copy the private key to the remote server. b. Use scp to copy the public key to the remote server. c. Use ssh-copy-id to copy the public key to the remote server. d. Use ssh-keygen on the server to generate a key pair that matches the client keys.

Use ssh-copy-id to copy the public key to the remote server.

Which is the default file system that is used in RHEL 8? a. Ext3 b. Ext4 c. XFS b. Btrfs

XFS

Which command prints the fourth field of a line in the /etc/passwd file if the text user occurs in that line? a. awk '/user/ { print $4 }' /etc/passwd b. awk -d : '/user/ { print $4 }' /etc/passwd c. awk -F : '/user/ $4' /etc/passwd d. awk -F : '/user/ { print $4 }' /etc/passwd

awk -F : '/user/ { print $4 }' /etc/passwd

Which of the following should be used in the .repo file to refer to a repository that is in the directory /repo on the local file system? a. file=/repo b. baseurl=file://repo c. baseurl=file:///repo d. file=http:///repo

baseurl=file:///repo

Which command enables you to get information about password properties such as password expiry? a. chage -l b. usermod --show c. passwd -l d. chage --show

chage -l

Which command does not set group ownership to the group sales for the file myfile? a. chgrp sales myfile b. chown .sales myfile c. chgrp myfile sales d. chown :sales myfile

chgrp myfile sales

Which command would be used to allow read and write permissions to the user and group owners and no permissions at all to anyone else? a. chown 007 filename b. chmod 077 filename c. chmod 660 filename d. chmod 770 filename

chmod 660 filename

Which command enables you to set the SGID permission on a directory? a. chmod u+s /dir b. chmod g-s /dir c. chmod g+s /dir d. chmod 1770 /dir

chmod g+s /dir

Which of the following commands would give the most accurate overview of mounted disk devices (without showing much information about mounted system devices as well)? a. mount b. mount -a c. df -hT d. du -h

df -hT

Which of the following is not a mandatory component in a .repo file that is used to indicate which repositories should be used? a. [label] b. name= c. baseurl= d. gpgcheck=

gpgcheck=

Which of the following commands would only show lines in the file /etc/passwd that start with the text anna? a. grep anna /etc/passwd b. grep -v anna /etc/passwd c. grep $anna /etc/passwd d. grep ^anna /etc/passwd

grep ^anna /etc/passwd

Which command was developed to show only the first ten lines in a text file? a. head b. top c. first d. cat

head

Which command shows the recommended way to display information about the network interface as well as its IP configuration? a. ifconfig -all b. ipconfig c. ip link show d. ip addr show

ip addr show

Which of the following commands cannot be used to send signals to processes? a. kill b. mkill c. pkill d. killall

mkill

Which command enables you to rename the file myfile to mynewfile? a. mv myfile mynewfile b. rm myfile mynewfile c. rn myfile mynewfile d. ren myfile mynewfile

mv myfile mynewfile

A user needs to work in a session where all new files that he creates will be group-owned by the group sales, until the session is closed. Which command would do that? a. chgrp sales b. setgid sales c. newgrp sales d. setgroup sales

newgrp sales

Which of the following commands shows correct syntax to set a fixed IP address to a connection using nmcli? a. nmcli con add con-name "static" ifname eth0 autoconnect no type ethernet ipv4 10.0.0.10/24 gw4 10.0.0.1 b. nmcli con add con-name "static" ifname eth0 autoconnect no type ethernet ipv4 10.0.0.10/24 gwv4 10.0.0.1 c. nmcli con add con-name "static" ifname eth0 type ethernet ipv4 10.0.0.10/24 gw4 10.0.0.1 d. nmcli con add con-name "static" ifname eth0 autoconnect no type ethernet ip4 10.0.0.10/24 gw4 10.0.0.1

nmcli con add con-name "static" ifname eth0 autoconnect no type ethernet ip4 10.0.0.10/24 gw4 10.0.0.1

Which man page contains excellent examples on nmcli usage? a. nmcli b. nmcli-examples c. nm-config d. nm-tools

nmcli-examples

Which of the following is the name of the text user interface to specify network connection properties? a. system-config-network b. system-config-networkmanager c. nmtui d. nmcli

nmtui

Which command enables you to make sure that others have no access to any new files that will be created in the /data directory, assuming that you want others to have read permissions on all other files? a. setfacl -m d:o::- /data b. setfacl -m o::- /data c. umask 027 /data d. umask 027

setfacl -m d:o::- /data


Related study sets

Computer LIFEPAC U 6 Questions and Answers

View Set

Communication, Nutrition, Documentation, Nursing Process

View Set

The Great Gatsby (Chapter Four & Five)

View Set