Unix OS

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

What FTP command runs a shell on the local computer?

!

Which of the following characters can be entered at the beginning of a line in a shell script to ensure that line is recognized as a comment rather than try to execute it?

#

What metacharacter indicates background command execution?

&

Select the regular expression metacharacter that matches 0 or more occurrences of the previous character.

*

Which of the following options will change the ownership of files and directories recursively within a directory? (Choose all that apply.)

-R --recursive

Callie wants to make sure that a filesystem is checked every 20 days. Which of the following options, when used with the tune2fs command, would set a full filesystem check to run every 14 days?

-i 14d (pg. 262)

Which of the following files can you add filenames to so that the git add * command will not stage them?

.gitignore (pg. 393)

Sandra needs to obtain the latest image of Fedora so that she can install it as a virtual machine on her Windows workstation. Which of the following file formats is Sandra likely to find available for download from Fedora's website in order to allow her to use the file as the source for booting and installing Linux as a VM?

.iso

Upon running the ifconfig command, the IP address is listed along with the subnet mask in dotted decimal notation listed as 255.255.255.224. You have installed a remote access software that has an address field that requires the address to be configured in CIDR notation. Which of the following is the equivalent CIDR notation for the subnet mask listed?

/27

Which of the following would be the device file for the third partition on the second SATA drive on a Linux system?

/dev/sdb3

Which of the following files does the hostnamectl command modify to set the hostname on a machine?

/etc/hostname

You currently have a Linux system configured to check the /etc/hosts file before trying to contact a DNS server to resolve host names. You want to reverse the configuration so that it checks with a DNS server before falling back to the /etc/hosts file. Which of the following files should you modify to make this possible?

/etc/nsswitch.conf

Which of the following files contain the path and filename where DNS servers should be configured?

/etc/resolv.conf (pg. 688)

What is the complete path and filename of the file where ports and their associated protocols are defined? ___________

/etc/services

Lynn runs the locate command and the results include many files from a directory that she doesn't want to include in her search. Which of the following files could Lynn modify so that the locate command no longer includes those results?

/etc/updatedb.conf

The Filesystem Hierarchy Standard specifies what directory as the root user's home directory?

/root

Under the root directory in Linux, which directory contains system commands and utilities?

/usr

What directory under / contains the log files and spools for a Linux system?

/var

What is the complete path and filename for the database that is used by the locate and mlocate commands?

/var/lib/mlocate/mlocate.db

What zone configuration file contains a PTR record used to identify the loopback adapter?

/var/named/named.local (pg. 690)

Where is the default document root directory for the Apache Web server?

/var/www/html

Which of the following umask settings will result in new files receiving the default permissions -rw-------?

0177

Which of the following is a valid APIPA address?

169.254.38.101

The output of the ifconfig shows a HWaddr expressed in hexadecimal. How many bits is the hardware address shown made up of?

48

Which of the following ports would be used to resolve a domain name to an IP address?

53

Jan needs to set permissions on a file so that the owner has read, write, and execute permissions. The group should have read permissions only, and everyone else should have no access. Which of the following parameters, when used with the chmod command, would set the permissions described?

740

At the vi command mode prompt, what key combination will force a quit from the vi editor without saving changes?

:q!

When issuing the ls -F command, what special character indicates a linked file?

@

When using the vi text editor, which of the following keys, when in command mode, will change to insert mode and place the cursor at the end of the current line?

A

Which of the following commands can be used to create a BASH variable named CREATOR with the value of Torvalds?

CREATOR="Torvalds"

Which of the following key combinations, commonly used in the vi editor command mode, displays current line statistics?

Ctrl + g

What kind of servers resolve fully qualified domain names to IP addresses for a certain namespace on the Internet?

DNS

Which of the following SQL statements can be used to delete a table from a database?

DROP TABLE table_name;

The iptables software on Linux is an example of what kind of software?

Firewall (pg. 32)

When using the vi text editor, which of the following keys, when in command mode, will move to the last line in the document?

G

Which of the following statements should be used at the end of a SQL statement where an aggregate function such as SUM or COUNT is used?

GROUP BY

When working with Sendmail, what command can be used to test SMTP support?

HELO

Which of the following is the greatest expense for companies using Linux?

Hiring people to maintain the Linux system (pg. 16)

Which of the following types of joins will return a record from two intersecting tables only if there is a match on the joining field from both tables?

INNER JOIN

Which of the following is a valid SQL statement for adding a new row of data to a SQL database table?

INSERT INTO users (firstname, lastname) values ('George', 'Washington');

What two Linux distributions utilize the Debian package manager by default?

Linux Mint Ubuntu Linux

Which of the following would be a term applicable to an e-mail program on a workstation that is used to view email?

MUA - Mail User Agent that users can use to view email on a system.

What DNS resource record type is used to provide the IP address for the e-mail server for a zone?

MX

Which of the following types of DNS records need to be configured to facilitate email delivery?

MX

Proxy servers keep track of the information passed to each client by maintaining what type of table?

Network Address Translation (NAT) (pg. 33)

Aria has modified the hard disk that hosts the operating system by using the fdisk command. The fdisk command indicates that the new partition information must be manually reloaded. Which of the following should she do next? (Choose two. Either answer is independently correct.)

Reboot the system Run the partprobe command (pg. 241)

What is the most commonly used LAN protocol?

TCP/IP

If a hard link is created to a file and then the original file is deleted, which of the following is true?

The original file will be removed while the hard link remains usable to access the contents of the file.

What would be the result of running the command chown :root file1.txt

This would set the group ownership of file1 to root.

You have set up a TFTP server to support PXE booting of several workstations. Which of the following protocols would this setup make use of?

UDP

Which of the following can be used to graphically remotely administer a Linux machine?

VNC

Which of the following types of technologies will create a tunneled encrypted connection from a remote location into a corporate network to be able to access resources as if the user was physically connected to the LAN?

VPN

In Linux, the core component of the GUI is known as:

X Windows (pg. 22)

Which type of CM software can connect to inventory members via SSH to perform configuration management activities?

agentless

Which of the following are true of the echo command?

all of the other options are true

A calendar for the current month can be shown on the command line by issuing which command?

cal

Which of the following commands will send the output of the cat command to the grep command to be filtered?

cat /etc/passwd | grep jsmith (The | (pipe) symbol will send the output of one command to another.)

Which of the following commands will display the current CPU(s) detected by a Linux system?

cat /proc/cpuinfo

In order to move from the /home/joe/test/data to the /home/joe directory, what command should be issued?

cd ../..

Which of these commands will set the following permissions on file1.txt? User = Read, Write, Execute Group = Read, Execute Others = Read

chmod 754 file1.txt chmod u=rwx, g=rx, u=r file1.txt

In order to set all of the special permissions on a certain file or directory, which command should be used on a file named filename?

chmod 7777 filename

Which of the following is used on modern Linux distributions that reads YAML configuration files to add apps, modify existing configuration settings, or perform administrative tasks at boot time?

cloud-init (pg. 728)

Which command can be used at a BASH command prompt to obtain a Web page?

curl (pg. 698)

Which of the following types of CM software only requires that you specify the attributes that the inventory members must have within a configuration file, not the individual procedures that must be executed on them?

declarative configuration (pg. 727)

Kate wants to compare two text files to identify what might have been changed from one version to another. Which of the following commands can she use to do this?

diff document1.txt document2.txt

Which of the following are valid permissions for a directory where the command chmod 1777 has been used to set the permissions on it?

drwxrwxrwt

You have just created a variable named CREATOR. Which of the following commands will display the contents of the variable to standard output?

echo $CREATOR

Which of the following commands will display detailed information for network hardware?

ethtool

After a shell is no longer needed, what command can be given to exit the shell?

exit

If the mkfs command is executed to create a filesystem and only the block device name is specified, which of the following filesystems will be created?

ext2

Which of the following is the keyword that should be listed after the hosts statement in the /etc/nsswitch.conf file so that the system will consult the /etc/hosts file to resolve a name to an IP address?

files

Which of the following commands can be used to recursively search a directory tree for files that meet a certain criterion without using a database or premade index of files?

find

Which of the following commands can be used to recursively search through the directory tree in search of a file that meets a set of given criteria instead of using an indexed database?

find

Which of the following commands will display all files and directories within the /var/log directory or its subdirectories which are owned by the root user? (Choose two.)

find /var/log -user root

Which of the following terms describes a type of useful and legitimate software that is distributed by a developer where they do not charge for the software but also do not distribute the source code along with it?

freeware (pg. 10)

What command can be used to check different kinds of filesystems on Linux for errors?

fsck (pg. 260)

What argument can be used with the chmod command to add read permission and remove write permission for a group on a file?

g+r-w

Which of the following commands will prompt to convert an MBR partition to GPT, thus destroying all existing MBR partitions on a disk?

gdisk (pg. 244)

Which of the following will display entries from the Name Service Switch libraries?

getent

Which command can be used to download an updated copy of the master branch from the original Git repository?

git pull origin master (pg. 396)

Chase is trying to extract records for employees 423 through 428 out of a comma separated values file and store them in another one. Which of the following commands would accomplish this? (Choose all that apply.)

grep "42[3-8]" < employees.csv > employees-newhires.csv cat employees.csv | grep "42[3-8]" > employees-newhires.csv grep "42[3-8]" employees.csv > employees-newhires.csv

Jo has received a text file which contains multiple instances of his name spelled correctly as well as multiple instances spelled as Joe. Which of the following commands would search a text file for any occurrences of either spelling and display them out to the terminal? (Choose three.)

grep "Joe*" document1.txt grep -E "Joe*" document1.txt grep -E "Joe?" document1.txt

Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out to the terminal. Which of the following commands could Garrett use to perform this search?

grep -E "(John|Bob)" salesemployees.csv

Which of the following commands will not interpret regular expressions, which translates into faster results being returned? (Choose all that apply.)

grep -F fgrep

Which of the following will look at the /etc/passwd file for any lines containing the word root and display them out to the screen while simultaneously writing the results to a file?

grep root /etc/passwd | tee ~/root.txt

You run the command hostname server1 and issue the reboot command. You notice that the host name has reverted back to what it was before the reboot. Which of the following commands should you have used to change the host name instead?

hostnamectl set-hostname server1

What command can be used to view and modify the date and time within the BIOS?

hwclock

The system administrator has shut ethernet interface eth0 down while making some changes to the system. Which of the following commands can they use to bring the network connection back up?

ifup eth0

When connecting to a host via SSH for the first time, the user is prompted to accept the encryption fingerprint for the target computer which is stored in ___________ in the ~/.ssh/ directory.

known_hosts

Which of the following commands will create a symbolic link named foo.txt to an original file named bar.txt

ln bar.txt foo.txt

Which of the following permissions would show for a symbolic link when displayed with the ls -l command?

lrwxrwxrwx

Select the command that can be used to provide a long listing for each file in a directory:

ls -L

Wayne is using the command line and is in his home directory. Which of the following will display a list of all files and their sizes from his home directory? (Choose two.)

ls -al ~ ls -al /home/wayne

Nicholas wants to verify whether a file is a hard link to a file within the same directory. Which of the following commands could he use to see information that would be helpful to make this determination?

ls -i

Jamie has created a hard link to another file within the same directory. Which of the following commands can he use to verify that the hard link was created correctly? (Choose all that apply.)

ls -i ls -il

Which of the following can be used to show the block devices on a Linux system? (Choose two.)

ls /sys/block--The /sys/block directory contains the block devices on a Linux system.nd repair quota files. lsblk--The lsblk command will not only show the block devices on a Linux system, but will also show information such as their major and minor numbers, size, and whether it is readonly.

Which of the following commands can be used to display any email messages awaiting delivery alongside the reason that they were not delivered?

mailq (pg. 712)

The apropos list command produces the same results as which command below?

man -k list

Dustin runs a command at the command line trying to find out what kernel version the system is running. However, it doesn't give him the information he needs. He knows there is an option that can be used to display the kernel version. How can he find out which option to use?

man uname

Which of the following commands can be used to create and manage a software RAID configuration after installation?

mdadm (pg. 293)

Select the utility below that will start and perform a thorough check of RAM for hardware errors when run.

memtest86

Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for projectx. However, this is the first project she has worked on in 2019 and the 2019projects directory does not exist yet. Which of the following commands will create the higher level directories if they do not already exist?

mkdir -p ~/2019projects/project/projectplans

Leonard wants to find detailed information about the Bluetooth kernel module. Which of the following commands can he use to display this information?

modinfo bluetooth (pg. 313)

What file under the proc directory contains information regarding what modules are currently loaded into the Linux kernel?

modules (pg. 316)

What ftp command uploads the filename from the current directory on the local computer to the current directory on the remote computer and allows the use of wildcard metacharacters to specify the filename?

mput filename (pg. 708)

Jim wants to rename a directory for a project that he has been working on. Which of the following commands can he use to perform that action?

mv projectx projecty

Which of the following are valid statements in the /etc/resolv.conf file? (Choose two.)

nameserver 10.1.1.4 domain comptia.org

Which of the following commands will show active UDP connections on a Linux system? (Choose all that apply.)

netstat --udp netstat -u

After modifying the /etc/aliases file, what command must be run in order to rebuild the aliases database?

newaliases (pg. 712)

On a system running NetworkManager, which of the following commands can be used to view or modify connection information?

nmcli

When using command-line terminal, specific letters that start with a dash ("-") and appear after command names are considered to be:

options

What PostgreSQL command-line utility backs up PostgreSQL database settings?

pg_dump (pg. 715)

Which of the following commands will send 4 ICMP echo requests to a remote host named server1 to determine the round trip time it takes a packet to travel?

ping -c 4 server1

Mike has changed directory into one subdirectory after the next and has lost track of where he's at in the directory tree. Which of the following commands can he use to tell him the full path to the current subdirectory he is in?

pwd

What command can be issued to confirm which directory you are in at a command line prompt?

pwd

Which of the following can be included in a shell script to ask the user to type in a password and then store it in the variable named $password?

read -s -p "Please enter the password: " password

Which of the following commands will display a summarization of quotas for a filesystem?

repquota

Which of the following commands will delete a directory and all of the files contained within it? (Choose all that apply.)

rm -rf olddir

Which of the following commands will count down from 10 to 1?

seq 10 -1 1

After logging into a terminal, a user will receive an interface known as which option?

shell

Which of the following is a valid method of running a script named myscript.sh? (Choose two)

source myscript.sh ./myscript.sh

Which of the following commands can be used to display socket information out to the terminal screen?

ss

What command is most effective at identifying different types of files?

stat

If enough unique letters of a directory name have been typed, what key can be pressed to activate the BASH shell's completion feature?

tab

T o display a text file in reverse order, what command should be used?

tac

What command can be used to display the last five lines of a text file?

tail -5

Which of the following commands can be used to update the last modified timestamp on a file, or if the file specified does not exist will create the file?

touch file.txt

Which of the following commands can be used to trace an IPv6 route? (Choose two.)

traceroute6 tracepath6

Elijah is done working with an external USB hard drive and wants to properly disconnect it. Which of the following commands should he use before unplugging the USB cable?

umount (pg. 221)

John has been using the cdrom on his computer that is running the Linux operating system. He pushes the eject button on the front of the drive, but it doesn't eject the disk. Which of the following commands should he run? (Choose all that apply.)

umount /media/cdrom eject /media/cdrom

An alias has previously been created named showauth. Which of the following commands can be used to get rid of that alias?

unalias showauth (pg. 366)

How many times will the following loop execute as part of a script: #!/bin/bash COUNTER=0 while [ $COUNTER -lt 7 ] do echo "hello world" done

until ctrl-c is used to terminate it

Jean installs a distribution of Linux on a workstation and attempts to run the locate command to find a certain file. Instead of returning the results she expected, an error message is displayed that it cannot find the mlocate.db file in its default location. Which of the following commands should Jean run in an attempt to resolve this problem?

updatedb

The Linux kernel exists as a file named:

vmlinuz

Which of the following commands will return one result of where the grep binary executable is located? (Choose two.)

which grep type grep

Which Linux command can be utilized to display your current login name?

whoami

What metacharacter can be used to issue two commands to be run in consecutive order, without piping or redirecting output?

wrong: \

Archie wants to optimize an XFS filesystem and minimize the chance of future corruption. Which of the following commands will compact or otherwise improve the layout of the contiguous blocks of file data for an XFS filesystem?

xfs_fsr The xfs_fsr command will compact or otherwise improve the layout of the extents, or contiguous blocks of data, for an XFS filesystem.


Set pelajaran terkait

Chapter 4: Leveraging Resources and Capabilities

View Set

Chapter 35: Key Pediatric Nursing Interventions

View Set

International business management exam 2

View Set

Taxes & Tax Shelters: Types of Taxable Income

View Set