Font size
WorksheetsLinux essencials
Total questions: 44
Worksheet time: 44mins
What are the differences between hard disk and solid state disk?
Hard disk have a motor and moving parts, solid state disk do not
Hard disk can fail due to physical damage, shile solid state disk cannot fail
/dev/sda is a hard disk devide while /dev/ssda is a solid state disk
Solid state disk provide faster Access to stored data than a hard disk.
Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored on a DNS server?
In the A record for 165.100.51.198.ipv4.arpa.
In the PTR record for 165.100.51.198.in-addr.arpa.
In the RNAME record for 198-51-100-165.rev.arpa.
In the ARPA record for 165.100.51.198.rev.
In the REV record for arpa.in-addr.198.51.100.165.
What information can be displayed by top?
Existing files, ordered by their size.
Running processes, ordered by CPU or RAM consumption.
User accounts, ordered by the number of logins.
User groups, ordered by the number of members.
User accounts, ordered by the number of files.
Which of the following commands can be used to resolve a DNS name to an IP address?
dnsname
dns
query
host
iplookup
Which of the following outputs comes from the command free?
what is the UID of the user root?
1
-1
255
65636
0
What is true about the owner of a file?
Each file is owned by exactly one user and one group.
The owner of a file always has full permissions when accessing the file.
The user owning a file must be a member of the file’s group.
When a user is deleted, all files owned by the user disappear.
The owner of a file cannot be changed once it is assigned to an owner.
What information is stored in /etc/passwd? (Choose three.)
The user’s storage space limit
The numerical user ID
The username
The encrypted password
The user\s default shell
Which of the following tar options handle compression? (Choose two.)
-bz
-z
-g
-j
-z2
Which of the following keys can be pressed to exit less?
i
x
e
q
!
Which of the following commands sorts the output of the command export-logs?
export-logs < sort
export-logs > sort
export-logs & sort
export-logs | sort
export-logs <> sort
*.txt
a b
c.cav
a.txt
a. txt
b. txt
Which of the following commands will search for the file foo.txt under the directory /home?
search /home –file foo.txt
search /home foo. txt
find /home – file foo.txt
find /home –name foo.txt
find /home foo.txt
The file’s extension should be changed from .sh to .bin.
The execute bit should be set in the file’s permissions.
The user executing the script should be added to the exec group.
The SetUID bit should be set in the file’s permissions
The script should be run using #!./test. sh instead of ./test.sh.
What is a Linux distribution?
The Linux file system as seen from the root account after mounting all file systems.
A bundling of the Linux kernel, system utilities and other software.
The set of rules which governs the distribution of Linux kernel source code
An operating system based on Linux but incompatible to the regular Linux kernel.
Which package management tool is used in Red Hat-based Linux Systems?
portage
rpm
apt-get
dpkg
packagectl
Why are web browser cookies considered dangerous?
Cookies support identification and tracking of users.
Cookies are always public and accessible to anyone on the internet.
Cookies consume significant amounts of storage and can exhaust disk space.
Cookies store critical data which is lost when a cookie is deleted.
Cookies can contain and execute viruses and malware.
Which of the following are typical services offered by public cloud providers? (Choose three.)
Platform as a Service(PaaS)
Infrastructure as a Service(IaaS)
Internet as a Service(IaaS)
Graphics as a Service (GaaS)
Software as a Service (SaaS)
Which of the following characters in a shell prompt indicates the shell is running with root privileges?
!
#
*
&
$
What is true about a recursive directory listing?
It includes the content of sub-directories.
It includes the permissions of the directory listed.
It includes details of file system internals, such as inodes.
It includes ownership information for the files.
It includes a preview of content for each file in the directory.
Which of the following directories contains information, documentation and example configuration files for installed software packages?
/usr/share/doc/
/etc/defaults/
/var/info/
/doc/
/usr/examples/
Which of the following commands adds the directory /new/dir/ to the PATH environment variable?
$PATH=/new/dir: $PATH
PATH=/new/dir: PATH
export PATH=/new/dir: PATH
export $PATH=/new/dir: $PATH
export PATH=/new/dir: $PATH
A user is currently in the directory /home/user/Downloads/ and runs the command
ls ../Documents/
Assuming it exists, which directory’s content is displayed?
/home/user/Documents/
/home/user/Documents/Downloads/
/home/user/Downloads/Documents/
/Documents/
/home/Documents
Which of the following is a protocol used for automatic IP address configuration?
NFS
LDAP
SMTP
DNS
DHCP
Which of the following devices represents a hard disk partition?
/dev/ttyS0
/dev/sata0
/dev/part0
/dev/sda2
/dev/sda/p2
What can be found in the /proc/ directory?
One directory per installed program.
One device file per hardware device.
One file per existing user account.
One directory per running process.
One log file per running service.
A new server needs to be installed to host services for a period of several years. Throughout this time, the server should receive important security updates from its
Linux distribution.
Which of the following Linux distributions meet these requirements? (Choose two.)
Ubuntu Linux LTS
Fedora Linux
Debian GNU/Linux Unstable
Ubuntu Linux non-LTS
Red Hat Enterprise Linux
Which of the following directories must be mounted with read and write access if it resides on its own dedicated file system?
/opt
/lib
/etc
/var
/usr
The ownership of the file doku.odt should be changed. The new owner is named tux. Which command accomplishes this change?
chmod u=tux doku.odt
newuser doku.odt tux
chown tux doku.odt
transfer tux: doku.odt
passwd doku.odt:tux
What happens to a file residing outside the home directory when the file owner's account is deleted? (Choose two.)
During a file system check, the file is moved to /lost +found.
The file is removed from the file system.
The UID of the former owner is shown when listing the file's details.
The user root is set as the new owner of the file.
Ownership and permissions of the file remain unchanged.
What is true about links in a Linux file system?
A symbolic link can only point to a file and not to a directory.
A hard link can only point to a directory and never to a file.
When the target of the symbolic link is moved, the link is automatically updated.
A symbolic link can point to a file on another file system.
Only the root user can créate hard links.
Which files are the source of the information in the following output? (Choose two.)
uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (wireshark), 989 (docker), 1001 (libvirt)
/etc/id
/etc/passwd
/etc/group
/home/index
/var/db/users
Which of the following tasks can the command passwd accomplish? (Choose two.)
Change a user's username.
Change a user's password.
Create a new user account.
Create a new user group.
Lock a user account.
Which command displays file names only and no additional information?
ls -a
ls -lh
ls -l
ls -alh
ls -nl
Which of the following commands puts the lines of the file data.csv into alphabetical order?
a..z data.csv
sort data.csv
abc data.csv
wc -s data.csv
grep --sort data.csv
Which of the following examples shows the general structure of a for loop in a Shell script?
for *.txt as file => echo $file
for *.txt ( echo $i )
for file in *.txt
do
echo $i
done
for ls *.txt exec {} \;
foreach @{file} {
echo $i
}
What is the return value of a shell script after successful execution?
1
0
-1
-255
255
Which of the following statements are true regarding a typical shell script? (Choose two.)
It has the executable permission bit set.
It starts with the two carácter sequence #!.
It is located in /usr/local/scripts/.
It is located in /etc/bash/scripts/.
It is compiled into a binary file compatible with the current machine architecture.
Which of the following commands extracts the contents of the compressed archive file1.tar.gz?
tar -czf file1.tar.gz
ztar file1.tar.gz
tar -xzf file1.tar.gz
tar --extract file1.tar.gz
detar file1.tar.gz
Which of the following commands finds all lines in the file operating-systems.txt which contain the term linux, regardless of the case?
igrep linux operating-systems.txt
less -i linux operating-systems.txt
grep -i linux operating-systems.txt
cut linux operating-systems.txt
cut [Ll] [Ii] [Nn] [Uu] [Xx] operating-systems.txt
Which of the following programs are web servers? (Choose two.)
Apache HTTPD
Postfix
Curl
Dovecot
Nginx
Which of the following Linux Distributions is derived from Red Hat Enterprise Linux?
Raspbian
OpenSUSE
Debian
Ubuntu
CentOS
What are the differences between a private web browser window and a regular web browser window? (Choose three.)
Private web browser windows do not allow printing or storing websites.
Private web browser windows do not store cookies persistently.
Private web browser windows do not support logins into websites.
Private web browser windows do not keep records in the browser history.
Private web browser windows do not send regular stored cookies.
What is the preferred source for the installation of new applications in a Linux based operating system?
The vendor's version management system
A CD-ROM disk
The distribution's package repository
The vendor's website
A retail store
