Linux LPI Essentials Practice Exam Back to exams page. Take the Linux LPI Essentials course here. Read our labs book on Amazon. 1. Which of these Linux distributions is derived from Red Hat?DebianGentooSlackwareCentOSQuestion 1 of 50 2. Which of the following open source applications is a desktop e-mail client?GIMPLibreOfficeFirefoxThunderbirdQuestion 2 of 50 3. Debian Linux comes with which package manager built in?ZypperAptYumPacmanQuestion 3 of 50 4. Which of the following open source packages includes a file share?HTTPDMySQLNextcloudPHPQuestion 4 of 50 5. You are releasing, as open source, a software program meant to be used over a network. What license should you use if you want to ensure that anyone who modifies and lets others use the program must also share the source?GPLAGPLMITBSDQuestion 5 of 50 6. Which of the following is not considered a common character class for enforcing strong passwords?LettersNumbersSymbolsNon-ASCII charactersQuestion 6 of 50 7. Which 'history' flag would you use to remove a single item from the shell history?-d-c-r-pQuestion 7 of 50 8. What is the name of the predecessor to Bash?C ShellZ ShellBourne ShellThere isn't one; Bash was the first Linux shell.Question 8 of 50 9. What happens if you unset the PATH variable in a Bash session?Bash will use a default PATH variable instead.No commands will work and you'll have to restart the shell.Only Bash built-ins will work.Only Bash built-ins and absolute-path commands will work.Question 9 of 50 10. Which directory does not contain useful help information?/usr/share/doc/usr/share/help/usr/share/man/usr/share/infoQuestion 10 of 50 11. Which command should you run before using 'locate' for the first time?initlocatesetupupdatedblocatedbQuestion 11 of 50 12. You want information on the 'time()' system call, but 'man time' instead just gets you information on the shell command. How should you correct this?man syscall timeman time --syscallman 2 timeman 8 timeQuestion 12 of 50 13. Which of the following is an absolute path?./foo/foo/bar../foofoo/barQuestion 13 of 50 14. Where would the home directory for user 'bob' be located?/bob/home/bob/Users/bobC:\Users\BobQuestion 14 of 50 15. Which combination of options to 'ls' will include a human-readable size in the output?-ah-as-lh-lsQuestion 15 of 50 16. Which flag to 'ls' will list hidden files?-h-l-a-AQuestion 16 of 50 17. What happens if you run 'rmdir' on a directory that contains files?The directory is removed.An error is printed, and the directory is not removed.The files inside the directory are removed, but the directory itself is not.The directory is removed, and the files inside are moved to the current directory.Question 17 of 50 18. Which path would be listed by 'ls *.*'?./../foofoo.txtQuestion 18 of 50 19. What is the fastest way to move a large file to another location on the same filesystem?Copy with 'cp', then remove the old fileCopy with 'dd', then remove the old fileMove with 'mv'Synchronize with 'rsync'Question 19 of 50 20. Which combination of options would you pass to 'tar' to create a gzipped tarball?-czf-xf-tzf-dfQuestion 20 of 50 21. Which archive format is not supported by 'tar'?gzipbzip2ZIPxzQuestion 21 of 50 22. Choose the string matched by this regular expression: ^$^$^$None of the aboveQuestion 22 of 50 23. Which redirection operator would you use to send only stderr to a file, overwriting whatever is there?&>&>>1>2>Question 23 of 50 24. What will be the output of the following command?echo 'foobarbaz' | grep b | sort -rfoobarbazbazbarNone of the aboveQuestion 24 of 50 25. What special variable contains the current process ID?$_$!$?$$Question 25 of 50 26. What special variable contains the list of arguments passed to a script?$@$0$#$?Question 26 of 50 27. What will the following shell script do?while true; doecho 'hello'donePrint hello" for all eternity"Print hello" as long as the 'true' variable has a value"Exit with an errorExit successfully, printing nothingQuestion 27 of 50 28. What special variable contains the name of the current shell or script being run?$!$#$0$?Question 28 of 50 29. What happens if you forget to include the shebang (#!) line in a script?The script will failThe script will run under the user's current shellThe script will always run under BashNone of the aboveQuestion 29 of 50 30. Which exit status means that the previous command exited successfully, without error?01-1255Question 30 of 50 31. Which of these devices most likely represents a printer?/dev/ptmx/dev/lp0/dev/tty0/dev/portQuestion 31 of 50 32. When setting up disks on a new system, you want to configure multiple logical volumes rather than allocating partitions based on the physical disks. Which tool would you use?JBODRAIDLVMfdiskQuestion 32 of 50 33. What directory is typically used when manually mounting an external disk or file share?/data/mnt/media/mountQuestion 33 of 50 34. Which directory contains files representing disk partitions, TTY's, and other system devices?/boot/proc/sys/devQuestion 34 of 50 35. What does the 'free' command do?Prints information about free disk spacePrints information about free memoryFrees extra RAM that is not being usedHelps you to free up more disk spaceQuestion 35 of 50 36. The 'dmesg' command will show you what type of system logs?Kernel logsFirewall logsAudit logsWooden logsQuestion 36 of 50 37. The /etc/hosts file could be considered a static replacement for what network protocol?ARPDNSBOOTPDHCPQuestion 37 of 50 38. Which file, historically, has been where the DNS nameservers were configured?/etc/dns.conf/etc/hosts/etc/resolv.conf/etc/nsswitch.confQuestion 38 of 50 39. What is root's user ID?01-19999Question 39 of 50 40. Which of the following is not a typical default characteristic of system users, relative to normal users?They do not have home directories.They have user ID's lower than 1000.They have no aging (expiration) values set.They are not listed in /etc/shadow.Question 40 of 50 41. Which field is not included in /etc/passwd?User IDPrimary group IDAccount expiration dateA comment fieldQuestion 41 of 50 42. Which field is not included in /etc/shadow?Date of last password changeEncrypted passwordMaximum password ageUser IDQuestion 42 of 50 43. Which field is not present in /etc/group?Group creation dateEncrypted group passwordGroup IDList of group membersQuestion 43 of 50 44. What is the purpose of giving /usr/bin/passwd 'setuid root' permissions?It allows users to change their own passwordsIt prevents users from being able to change other users' passwordsIt allows root to change any user's passwordNone of the aboveQuestion 44 of 50 45. How would the following command set permissions for foo.txt?chmod 600 foo.txtUser: Read, write, executeEveryone else: NoneUser: Read-onlyEveryone else: NoneEveryone: Read, writeUser: Read, writeEveryone else: NoneQuestion 45 of 50 46. What would the octal representation be of these permissions, as returned by 'ls -l'?-rwsr-xr-x0755475527551755Question 46 of 50 47. Which of the following is not true about hard links?If you modify a file, other files hard-linked to it will also be modified.Hard links may cross partition boundaries.Hard-linked files share the same inode.If a file is deleted, other files hard-linked to it will still exist.Question 47 of 50 48. Which of the following is not true about symbolic links?If you modify a file, other files symlinked to it will also be modified.Symlinks may cross partition boundaries.Symlinked files share the same inode.If a file is deleted, other files symlinked to it will still exist.Question 48 of 50 49. What will be the output of the following command?echo 'foobarbaz' | grep '.*' | wc -l039None of the aboveQuestion 49 of 50 50. What will be the output of the following command?echo 'foobarbaz' | head -2 | cut -da -f2rfoorfoobNone of the aboveQuestion 50 of 50 Loading...