Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linux Foundation Certified System Administrator Exam Questions and Answers 2023, Exams of Computer Science

A list of 51 questions and answers related to Linux system administration. The questions cover topics such as SysV init configuration, BIOS, RPM package management, mount points, and Debian package management. useful for students preparing for the Linux Foundation Certified System Administrator Exam or for anyone interested in learning more about Linux system administration.

Typology: Exams

2023/2024

Available from 10/06/2023

TOPGradeBooster.
TOPGradeBooster. 🇺🇸

3.6

(59)

7.5K documents

1 / 48

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Linux Foundation Certified System Administrator Exam
Questions and Answers 2023
- Single Topic
Question #1
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
A. /etc/keys
B. /proc/keys
C. /etc/inittab
D. /proc/inittab
E. /etc/reboot
Answer: C
Question #2
During a system boot cycle, what program is executed after the BIOS completes its tasks?
A. The bootloader
B. The inetd program
C. The init program
D. The kernel
Answer: A
Question #3
Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct
answers.)
A. 0
B. 1
C. 3
D. 5
E. 6
Answer: AE
Question #4
Which of the following statements is correct when talking about /proc/?
A. All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot.
B. All files within /proc/ are read-only and their contents cannot be changed.
C. All changes to files in /proc/ are immediately recognized by the kernel.
D. All files within /proc/ are only readable by the root user.
Answer: C
Question #5
What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)
A. Entries for all possible devices get created on boot even if those devices are not connected.
B. Additional rules for udev can be created by adding them to /etc/udev/rules.d/.
C. When using udev, it is not possible to create block or character devices in /dev/ using mknod.
D. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.
E. The content of /dev/ is stored in /etc/udev/dev and is restored during system startup.
Answer: BD
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30

Partial preview of the text

Download Linux Foundation Certified System Administrator Exam Questions and Answers 2023 and more Exams Computer Science in PDF only on Docsity!

Linux Foundation Certified System Administrator Exam

Questions and Answers 2023

  • Single Topic Question # Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination? A. /etc/keys B. /proc/keys C. /etc/inittab D. /proc/inittab E. /etc/reboot Answer: C Question # During a system boot cycle, what program is executed after the BIOS completes its tasks? A. The bootloader B. The inetd program C. The init program D. The kernel Answer: A Question # Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.) A. 0 B. 1 C. 3 D. 5 E. 6 Answer: AE Question # Which of the following statements is correct when talking about /proc/? A. All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot. B. All files within /proc/ are read-only and their contents cannot be changed. C. All changes to files in /proc/ are immediately recognized by the kernel. D. All files within /proc/ are only readable by the root user. Answer: C Question # What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.) A. Entries for all possible devices get created on boot even if those devices are not connected. B. Additional rules for udev can be created by adding them to /etc/udev/rules.d/. C. When using udev, it is not possible to create block or character devices in /dev/ using mknod. D. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup. E. The content of /dev/ is stored in /etc/udev/dev and is restored during system startup. Answer: BD

Question # Which of the following information is stored within the BIOS? (Choose TWO correct answers.) A. Boot device order B. Linux kernel version C. Timezone D. Hardware configuration E. The system's hostname Answer: AD Question # Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.) A. shutdown - r now B. shutdown - r "rebooting" C. telinit 6 D. telinit 0 E. shutdown - k now "rebooting" Answer: AC Question # Which of the following are init systems used within Linux systems? (Choose THREE correct answers.) A. startd B. systemd C. Upstart D. SysInit E. SysV init Answer: BCE Question # SUMULATION - Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.) Answer: cmdline - or- /proc/cmdline Question # What information can the lspci command display about the system hardware? (Choose THREE correct answers.) A. Device IRQ settings B. PCI bus speed C. System battery type D. Device vendor identification E. Ethernet MAC address Answer: ABD Question # Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.) A. shutdown - R 1 now B. shutdown - single now

Question # After modifying GNU GRUB's configuration file, which command must be run for the changes to take effect? A. kill - HUP $(pidof grub) B. grub-install C. grub D. No action is required Answer: D Question # Which of the following commands is used to update the list of available packages when using dpkg based package management? A. apt-get update B. apt-get upgrade C. apt-cache update D. apt-get refresh E. apt-cache upgrade Answer: A Question # Which of the following commands lists the dependencies of a given dpkg package? A. apt-cache depends-on package B. apt-cache dependencies package C. apt-cache depends package D. apt-cache requires package Answer: C Question # Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user? A. hidemenu B. splash C. timeout D. showmenu Answer: C What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct answers.) A. To create RAID 9 arrays. B. To dynamically change the size of logical volumes. C. To encrypt logical volumes. D. To create snapshots. E. To dynamically create or delete logical volumes. Answer: BDE Question # Which of the following commands updates the linker cache of shared libraries? A. mkcache B. soconfig

C. mkldconfig D. lddconfig E. ldconfig Answer: E Question # Which of the following commands lists all currently installed packages when using RPM package management? A. yum --query --all B. yum --list --installed C. rpm --query --all D. rpm --list – installed Answer: C Question # Which of the following commands can be used to download the RPM package kernel without installing it? A. yum download --no-install kernel B. yumdownloader kernel C. rpm --download --package kernel D. rpmdownload kernel Answer: B Question # When using rpm --verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.) A. Timestamps B. MD5 checksums C. Inodes D. File sizes E. GnuPG signatures Answer: ABD Question # Which of the following is correct when talking about mount points? A. Every existing directory can be used as a mount point. B. Only empty directories can be used as a mount point. C. Directories need to have the SetUID flag set to be used as a mount point. D. Files within a directory are deleted when the directory is used as a mount point. Answer: A Question # Which function key is used to start Safe Mode in Windows NT? A. F B. F C. F D. Windows NT does not support Safe Mode

Which file should be edited to select the network locations from which Debian installation package files are loaded? A. /etc/dpkg/dpkg.cfg B. /etc/apt/apt.conf C. /etc/apt/apt.conf.d D. /etc/apt/sources.list E. /etc/dpkg/dselect.cfg Answer: D Question # SIMULATION - Which option to the yum command will update the entire system? (Specify ONLY the option name without any additional parameters.) Answer: update - or- upgrade Question # SIMULATION - Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.) Answer: swapoff - or- /sbin/swapoff Question # SIMULATION - Which Debian package management tool asks the configuration questions for a specific already installed package just as if the package were being installed for the first time? (Specify ONLY the command without any path or parameters.) Answer: dpkg-reconfigure Question # Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it? A. dd if=/dev/zero of=/dev/sda bs= B. dd if=/dev/zero of=/dev/sda bs=512 count= C. dd if=/dev/zero of=/dev/sda bs=440 count= D. dd if=/dev/zero of=/dev/sda bs= Answer: C Question # Which of the following commands can be used to create a USB storage media from a disk image? A. gdisk B. dd C. cc D. fdisk E. mount Answer: B Question #

In Bash, inserting 1>&2 after a command redirects A. standard error to standard input. B. standard input to standard error. C. standard output to standard error. D. standard error to standard output. E. standard output to standard input. Answer: C Question # What command will generate a list of user names from /etc/passwd along with their login shell? A. column - s : 1,7 /etc/passwd B. chop - c 1,7 /etc/passwd C. colrm 1,7 /etc/passwd D. cut - d: - f1,7 /etc/passwd Answer: D Question # In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories? A. - dirmax B. - maxdepth C. - maxlevels D. - n E. - s Answer: B Question # Which of the following statements is correct regarding the command foo 1> bar? A. The stdout from the command foo is appended to the file bar. B. The stdout from the command foo overwrites the file bar. C. The command foo receives its stdin from the file bar. D. The command foo receives its stdin from the stdout of the command bar. E. The stderr from the command foo is saved to the file bar. Answer: B Question # Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting? A. kill - PIPE 123 B. kill - KILL 123 C. kill - STOP 123 D. kill - TERM 123 Answer: D Question # SIMULATION -

C. myapp | cat > file1.log D. myapp | tee file1.log E. tee myapp file1.log Answer: D Question # What is the purpose of the Bash built-in export command? A. It allows disks to be mounted remotely. B. It runs a command as a process in a subshell. C. It makes the command history available to subshells. D. It sets up environment variables for applications. E. It shares NFS partitions for use by other systems on the network. Answer: D Question # What is the output of the following command? echo "Hello World" | tr - d aieou A. Hello World B. eoo C. Hll Wrld D. eoo Hll Wrld Answer: C Question # Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached? A. << B. <| C. !< D. &< Answer: A Question # Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt? A. file /tmp/myfile.txt B. echo "Hello" >/tmp/myfile.txt C. sed - ie "s/1/2/" /tmp/myfile.txt D. echo - n "Hello" >>/tmp/myfile.txt E. touch /tmp/myfile.txt Answer: A Question # What is the default nice level when a process is started using the nice command? A. - 10 B. 10 C. 20 D. 0

Answer: B Question # What is the default action of the split command on an input file? A. It will break the file into new files of 1,024 byte pieces each. B. It will break the file into new files of 1,000 line pieces each. C. It will break the file into new files of 1,024 kilobyte pieces each. D. It will break the file into new files that are no more than 5% of the size of the original file. Answer: B Question # What is the difference between the i and a commands of the vi editor? A. i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modes automatically. B. i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor. C. i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line. D. i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing. Answer: B Question # SIMULATION - Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.) Answer: jobs Question # Which of the following commands moves and resumes in the background the last stopped shell job? A. run B. bg C. fg D. back Answer: B Question # What is the effect of the egrep command when the - v option is used? A. It enables color to highlight matching parts. B. It only outputs non-matching lines. C. It shows the command's version information. D. It changes the output order showing the last matching line first. Answer: B Question # What does the symbol within regular expressions represent? A. Match the preceding qualifier one or more times. B. Match the preceding qualifier zero or more times. C. Match the preceding qualifier zero or one times.

B. set C. bashconf D. setsh E. envsetup Answer: B Question # Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter? A. sed '/bob/Bob' letter > newletter B. sed s/bob/Bob/ letter < newletter C. sed 's/bob/Bob' letter > newletter D. sed 's/bob/Bob/g' letter > newletter E. sed 's/bob, Bob/' letter > newletter Answer: D Question # From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.) A. source /usr/local/bin/runme.sh B.. /usr/local/bin/runme.sh C. /bin/bash /usr/local/bin/runme.sh D. /usr/local/bin/runme.sh E. run /usr/local/bin/runme.sh Answer: AB Question # Regarding the command: nice - 5 /usr/bin/prog Which of the following statements is correct? A. /usr/bin/prog is executed with a nice level of - 5. B. /usr/bin/prog is executed with a nice level of 5. C. /usr/bin/prog is executed with a priority of - 5. D. /usr/bin/prog is executed with a priority of 5. Answer: B Question # Which shell command is used to continue background execution of a suspended command? A. & B. bg C. cont D. exec E. :& Answer: B Question #

Which of the following shell redirections will write standard output and standard error output to a file named filename? A. 2>&1 >filename B. >filename 2>& C. 1>&2>filename D. >>filename E. 1&2>filename Answer: B Question # In the vi editor, which of the following commands will copy the current line into the vi buffer? A. c B. cc C. 1c D. yy E. 1y Answer: D Question # Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.) A. esc ZZ B. ctrl :w! C. esc zz D. esc :wq! E. ctrl XX Answer: AD Question # When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process? A. - 10 B. 0 C. 10 D. 20 Answer: C Question # Which of the following commands will reduce all consecutive spaces down to a single space? A. tr '\s' ' ' < a.txt > b.txt B. tr - c ' ' < a.txt > b.txt C. tr - d ' ' < a.txt > b.txt D. tr - r ' ' '\n' < a.txt > b.txt E. tr - s ' ' < a.txt > b.txt Answer: E Question #

C. var TEST="FOO" D. TEST="FOO" Answer: D Question # Which variable defines the directories in which a Bash shell searches for executable commands? A. BASHEXEC B. BASHRC C. PATH D. EXECPATH E. PATHRC Answer: C Question # Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types? A. magic B. type C. file D. pmagic E. hash Answer: C Question # SIMULATION - Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.) Answer: mkdir - or- /usr/bin/mkdir Question # Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose TWO correct answers.) A. find /tmp - uid root - print B. find - path /tmp - uid root C. find /tmp - user root - print D. find /tmp - user root E. find - path /tmp - user root – print Answer: CD Question # When running the command - sed - e "s/a/b/" /tmp/file >/tmp/file While /tmp/file contains data, why is /tmp/file empty afterwards? A. The file order is incorrect. The destination file must be mentioned before the command to ensure redirection. B. The command sed did not match anything in that file therefore the output is empty.

C. When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading. D. Redirection for shell commands do not work using the > character. It only works using the | character instead. Answer: C Question # When given the following command line. echo "foo bar" | tee bar | cat Which of the following output is created? A. cat B. foo bar C. tee bar D. bar E. foo Answer: B Question # Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.) A. uptime B. up C. top D. uname - u E. time – up Answer: AC Question # Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.) A. < B. <<< C. > D. >>> E. %> Answer: ABC Question # After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation? A. foo and bar would both be removed. B. foo would be removed while bar would remain accessible. C. foo would be removed. bar would still exist but would be unusable. D. Both foo and bar would remain accessible. E. The user is prompted whether bar should be removed, too. Answer: B Question #

B. 0640

C. 0038

D. 0027

Answer: D Question # Which of the following is the device file name for the second partition on the only SCSI drive? A. /dev/hda B. /dev/sda C. /dev/sd0a D. /dev/sd1p Answer: B Question # In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.) A. cat /proc/self/mounts B. free C. mount D. lsmounts E. cat /proc/filesystems Answer: AC Question # Which of the following commands can be used to locate programs and their corresponding man pages and configuration files? A. dirname B. which C. basename D. query E. whereis Answer: E Question # Which of the following commands changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting? A. tune2fs - d 200 /dev/sda B. tune2fs - c 200 /dev/sda C. tune2fs - i 200 /dev/sda D. tune2fs - n 200 /dev/sda E. tune2fs --days 200 /dev/sda Answer: C Question # Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters? A. ext

B. ext C. ext D. XFS E. VFAT Answer: A Question # How many fields are in a syntactically correct line of /etc/fstab? A. 3 B. 4 C. 5 D. 6 E. 7 Answer: D Question # SIMULATION - Which command is used to create and initialize the files used to store quota information? (Specify ONLY the command without any path or parameters.) Answer: quotacheck Question # Which of the following file permissions belong to a symbolic link? A. - rwxrwxrwx B. +rwxrwxrwx C. lrwxrwxrwx D. srwxrwxrwx Answer: C Question # Creating a hard link to an ordinary file returns an error. What could be the reason for this? A. The source file is hidden. B. The source file is read-only. C. The source file is a shell script. D. The source file is already a hard link. E. The source and the target are on different filesystems. Answer: E Question # Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.) A. /sbin/mke2fs - j /dev/sdb B. /sbin/mkfs - t ext3 /dev/sdb C. /sbin/mkfs - c ext3 /dev/sdb D. /sbin/mke3fs - j /dev/sdb Answer: AB