Linux Quiz Flashcards
DNS assigns hostnames to IP addresses. How is the name of the IP address 199.52.203.155 stored on a DNS server?
A. In the AAAA record for 155.203.52.199.ipv4.arpa.
B. In the PTR record for 155.203.52.199.in-addr.arpa.
C. In the CNAME record for 199-52-203-155.rev.arpa.
D. In the ARPA record for 155.203.52.199.rev.
E. In the REV record for arpa.in-addr.199.52.203.155
B. In the PTR record for 155.203.52.199.in-addr.arpa
Members of the class already have experience using Red Hat Linux. For a side project, the class members want to set up a Linux server to hold their study material. Which of the following Linux distros are based off Red Hat Linux and doesn’t require a subscription?
A. Ubuntu Linux LTS
B. Raspbian
C. Debian GNU/Linux
D. CentOS
E. openSUSE
D. CentOS
What information is displayed by the “top” command in a Linux system?
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 is used to resolve a DNS name to an IP address in a Linux system?
A. dnsname
B. dns
C. query
D. host
E. iplookup
F. nslookup
D. host
What are some of the things that the “dmesg” command shows in a Linux system? (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 kernels ring buffer that is held in memory.
D. It immediately outputs all new messages written to the system journal.
E. It might not display older information because it was overwritten by some newer information.
C. It displays the content of the Linux kernels ring buffer that is held in memory.
E. It might not display older information because it was overwritten by some newer information.
Which of the following outputs could come from using the “last” command in a Linux system?
A. 1. ls-l 2. cat bougus.txt 3. logout
B. Password for user last changed at Sat June 1 12:30:00 EST 2024
C. Last login: Fri May 28 11:31:25 2024 from support.MyCC.edu
D. EXT3-fs: mounted filesystem with ordered data mode.
E. Mike tty5 Wed June 20 21:11 - 23:22 (03:11)
E. Mike tty5 Wed June 20 21:11 - 23:22 (03:11)
What is the UID and the GID of the Administrator (root) user?
A. 1
B. 27
C. 999
D. 100
E. 0
E. 0
Which permissions are set on a regular file once the permissions have been modified with the command chmod 765 myfile.txt?
A. drwxrw-r-x
B. d-wxr-x–x
C. -rwxr-x–x
D. -rwxrw—x
E. -rwxrw-r-x
E. -rwxrw-r-x
Which of the following permissions are set on the /tmp/ directory?
A. drwxrwxrwt
B. dr-Xrw-rwx
C. drwxRw-rw
D. drwxrWx—
E. Dr-xr-x–t
A. drwxrwxrwt
Which command adds a new user Sara and creates the users home directory?
A. defaultuser Sara
B. useradd -m Sara
C. usercreate Sara
D. useradd Sara
E. passwd -a Sara
B. useradd -m Sara
Which of the following 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. When a user is deleted, all files owned by the user will disappear.
D. 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.
What keyword is used in a shell script to begin a loop?
A. if
B. echo
C. for
D. let
E. case
C. for
What information is stored in /etc/passwd? (Choose two.)
A. The user’s storage space limit
B. The numerical user ID
C. The username
D. The encrypted password
B. The numerical user ID
C. The username
Which of the tar options handle compression in a Linux system?
A. -bz
B. -z
C. g
D. -z2
B. -z
Which of the following commands creates an archive file course-1.tar from the contents of the directory ./assignments/?
A. tar–new course_1.tar .assignments/
B. tar -cf course_1.tar ./assignments/
C. tar create course_1.tgz -content ./assignments/
D. tar course_1 tar <./assignments/
E. tar assignments >course_1.tar
B. tar -cf course_1.tar ./assignments/
Which of the following keys can be pressed to exit the man pages in a Linux System?
A. l
B. x
C. e
D. q
E. !
D. q
The current directory contains the following file: -rwxr-xr-x 1 Jason Jason 012079 Feb 15 08:15 practice_test.sh
Given that the file is a valid shell script, how can this script be executed? (Choose two.)
A. run practive_test.sh
B. ${practice_test.sh}
C. cmd ./practice_test.sh
D. ./practice_test.sh
E. bash practice_test.sh
D. ./practice_test.sh
E. bash practice_test.sh
Which of the following commands sorts the output of the command export passwd?
A. export passwd < sort
B. export passwd > sort
C. export passwd & sort
D. export passwd l sort
E. export passwd <> sort
D. export passwd l sort
What does a Linux distribution consist of?
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, GNU tools and libraries, 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, GNU tools and libraries, and other software.
Which of the following commands will search for the file.kitty.txt under the directory /home?
A. search /home -file kitty.txt
B. search /home kitty.txt
C. find /home -file kitty.txt
D. find /home -name kitty.txt
E. find /home kitty.txt
D. find /home -name kitty.txt
The current directory contains the following file: -rw-rw-r– mike exec 24551 Jan 20 07:00 hello.sh
The file contains a valid shell script, but executing this file using ./hello.sh leads to this error: bash: ./hello.sh: Permission denied
What should be done in order to successfully execute the script?
A. The files extension should be changed from .sh to .bin.
B. The execute permission should be set in the file’s permissions.
C. The user executing the script should be added to the sudo group.
D. The SetUID bit should be set in the file’s permissions.
E. The script should be run using #!./hello.sh instead of ./hello.sh
B. The execute permission should be set in the file’s permissions.
Which package management tools is used in Red Hat-based Linux Systems? (Choose two)
A. yum
B. rpm
C. apt-get
D. dpkg
E. packagectl
A. yum
B. rpm
Which program considered a graphical editor for vector graphics in a Linux system?
A. Python
B. NGINX
C. Samba
D. Inkscape
E. GIMP
D. Inkscape
Where is the operating system stored on a Raspberry Pi?
A. On the master device HDD attached to the Raspberry Pi
B. On a read only partition on the Raspberry Pi’s firmware.
C. On a removable SD card which is put into Raspberry Pi’s SD slot.
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’s SD slot.