Linux Essentials 160 Flashcards
What are the differences between hard disk drives and solid state disks? (Choose two.)
A. Hard disks have a motor and moving parts, solid state disks do not.
B. Hard disks can fail due to physical damage, while solid state disks cannot fail.
C. Solid state disks can store many times as much data as hard disk drives.
D. /dev/sda is a hard disk device while /dev/ssda is a solid state disk.
E. Solid state disks provide faster access to stored data than hard disks.
A. Hard disks have a motor and moving parts, solid state disks do not.
E. Solid state disks provide faster access to stored data than hard disks.
Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored on a DNS server?
A. In the A record for 165.100.51.198.ipv4.arpa.
B. In the PTR record for 165.100.51.198.in-addr.arpa.
C. In the RNAME record for 198-51-100-165.rev.arpa.
D. In the ARPA record for 165.100.51.198.rev.
E. In the REV record for arpa.in-addr.198.51.100.165.
B. In the PTR record for 165.100.51.198.in-addr.arpa.
Which of the following types of bus can connect hard disk drives with the motherboard? A. The RAM bus B. The NUMA bus C. The CPU bus D. The SATA bus E. The Auto bus
D. The SATA bus
Members of a team already have experience using Red Hat Enterprise Linux. For a small hobby project, the team wants to set up a Linux server
without paying for a subscription. Which of the following Linux distributions allows the team members to apply as
much of their Red Hat Enterprise Linux knowledge as possible?
A. Ubuntu Linux LTS
B. Raspbian
C. Debian GNU/Linux
D. CentOS
E. openSUSE
D. CentOS
What information can be displayed by top?
A. Existing files, ordered by their size.
B. Running processes, ordered by CPU or RAM consumption.
C. User accounts, ordered by the number of logins.
D. User groups, ordered by the number of members.
E. User accounts, ordered by the number of files.
B. Running processes, ordered by CPU or RAM consumption.
Which of the following commands can be used to resolve a DNS name to an IP address? A. dnsname B. dns C. query D. host E. iplookup
D. host
What is true about the dmesg command? (Choose two.)
A. It traces the execution of a command and shows each step the program carries out.
B. It sends messages to the command lines of all current user sessions.
C. It displays the content of the Linux kernel’s ring buffer.
D. It immediately outputs all new messages written to the system journal.
E. It might not display older information because it was overwritten by newer information.
C. It displays the content of the Linux kernel’s ring buffer.
E. It might not display older information because it was overwritten by newer information.
Which of the following outputs could stem from the command last?
A. 1 ls
2 cat text.txt
3 logout
B. Password for user last changed at Sat Mar 31 16:38:57 EST 2018
C. Last login: Fri Mar 23 10:56:39 2018 from server.example.com
D. EXT4-fs (dm-7): mounted filesystem with ordered data mode. Opts: (null)
tty2 Wed May 17 21:11 - 21:11 (00:00)
E. root
E. root
What is the UID of the user root? A. 1 B. -1 C. 255 D. 65536 E. 0
E. 0
Which permissions are set on a regular file once the permissions have been modified with the command chmod 654 file.txt? A. drw-r-xr-- B. d--wxr-x-- C. -wxr-x--x D. -rwxrw---x E. -rw-r-xr--
E. -rw-r-xr–
What is true about the owner of a file?
A. Each file is owned by exactly one user and one group.
B. The owner of a file always has full permissions when accessing the file.
C. The user owning a file must be a member of the file’s group.
D. When a user is deleted, all files owned by the user disappear.
E. The owner of a file cannot be changed once it is assigned to an owner.
A. Each file is owned by exactly one user and one group.
Which of the following permissions are set on the /tmp/ directory? A. rwxrwxrwt B. ------rwX C. rwSrw-rwD. rwxrwS--- E. r-xr-X--t
A. rwxrwxrw
Which command adds the new user tux and creates the user's home directory with default configuration files? A. defaultuser tux B. useradd -m tux C. usercreate tux D. useradd -o default tux E. passwd -a tux
B. useradd -m tux
What information is stored in /etc/passwd? (Choose three.) A. The user's storage space limit B. The numerical user ID C. The username D. The encrypted password E. The user\s default shell
B. The numerical user ID
C. The username
D. The encrypted password
Which of the following tar options handle compression? (Choose two.) A. -bz B. -z C. -g D. -j E. -z2
B. -z
D. -j
What keyword is used in a shell script to begin a loop? (Specify one keyword only, without any additional information.)
A. Answer: for
Explanation
Explanation/Reference:
FOR
Which of the following commands creates an archive file work.tar from the contents of the directory ./work/? A. tar --new work.tar ./work/ B. tar -cf work.tar ./work/ C. tar -create work.tgz -content ./work/ D. tar work.tar < ./work/ E. tar work > work.tar
B. tar -cf work.tar ./work/
Which of the following keys can be pressed to exit less? A. l B. x C. e D. q E. !
D. q
The current directory contains the following file:
-rwxr-xr-x 1 root root 859688 Feb 7 08:15 test.sh
Given that the file is a valid shell script, how can this script be executed? (Choose two.)
A. run test.sh
B. ${test.sh}
C. cmd ./test.sh
D. ./test.sh
E. bash test.sh
D. ./test.sh
E. bash test.sh
Which of the following commands sorts the output of the command export-logs? A. export-logs < sort B. export-logs > sort C. export-logs & sort D. export-logs | sort E. export-logs <> sort
D. export-logs | sort
A directory contains the following files: What would be the output of the following shell script? for file in *.txt A. *.txt B. a b C. c.cav D. a.txt E. a. txt F. txt
F. txt
Which of the following commands will search for the file foo.txt under the directory /home? A. search /home -file foo.txt B. search /home foo. txt C. find /home - file foo.txt D. find /home -name foo.txt E. find /home foo.txt
D. find /home -name foo.txt
The current directory contains the following file:
-rw-r–r– 1 root exec 24551 Apr 2 12:36 test.sh
The file contains a valid shell script, but executing this file using ./test.sh leads to this error:
bash: ./test.sh: Permission denied
What should be done in order to successfully execute the script?
A. The file’s extension should be changed from .sh to .bin.
B. The execute bit should be set in the file’s permissions.
C. The user executing the script should be added to the exec group.
D. The SetUID bit should be set in the file’s permissions
E. The script should be run using #!./test. sh instead of ./test.sh.
B. The execute bit should be set in the file’s permissions
What is a Linux distribution?
A. The Linux file system as seen from the root account after mounting all file systems.
B. A bundling of the Linux kernel, system utilities and other software.
C. The set of rules which governs the distribution of Linux kernel source code.
D. An operating system based on Linux but incompatible to the regular Linux kernel.
E. A set of changes to Linux which enable Linux to run on another processor architecture.
B. A bundling of the Linux kernel, system utilities and other software.
Which package management tool is used in Red Hat-based Linux Systems? A. portage B. rpm C. apt-get D. dpkg E. packagectl
B. rpm
Which of the following programs is a graphical editor for vector graphics? A. Python B. NGINX C. Samba D. Inkscape E. MySQL
D. Inkscape
Where is the operating system of a Raspberry Pi stored?
A. On the master device attached to the Raspberry Pi’s IDE bus.
B. On a read only partition on the Raspberry Pi’s firmware, next to the BIOS.
C. On a removable SD card which is put into the Raspberry Pi.
D. On a Linux extension module connected to the Raspberry Pi’s GPIO pins.
E. On rewritable flash storage which is built into the Raspberry Pi
C. On a removable SD card which is put into the Raspberry Pi.
What is defined by a Free Software license?
A. Details of the technical documentation each contributor has to provide.
B. The programming languages which may be used to extend the licensed program.
C. A complete list of libraries required to compile the licensed software.
D. Limits on the purposes for which the licensed software may be used.
E. Conditions for modifying and distributing the licensed software.
E. Conditions for modifying and distributing the licensed software
Why are web browser cookies considered dangerous?
A. Cookies support identification and tracking of users.
B. Cookies are always public and accessible to anyone on the internet.
C. Cookies consume significant amounts of storage and can exhaust disk space.
D. Cookies store critical data which is lost when a cookie is deleted.
E. Cookies can contain and execute viruses and malware.
A. Cookies support identification and tracking of users
Which of the following are typical services offered by public cloud providers? (Choose three.) A. Platform as a Service(PaaS) B. Infrastructure as a Service(IaaS) C. Internet as a Service(IaaS) D. Graphics as a Service (GaaS) E. Software as a Service (SaaS)
A. Platform as a Service(PaaS)
B. Infrastructure as a Service(IaaS)
E. Software as a Service (SaaS)
Which of the following characters in a shell prompt indicates the shell is running with root privileges? A. ! B. # C. * D. & E. $
B. #