diff --git a/certificates/essentials/example_questions.md b/certificates/essentials/example_questions.md new file mode 100644 index 0000000..768c88c --- /dev/null +++ b/certificates/essentials/example_questions.md @@ -0,0 +1,153 @@ +# Questions + +1. What are the differences between hard disk drives and solid state disks? (Choose two.) + * Hard disks have a motor and moving parts, solid state disks do not. + * Hard disks can fail due to physical damage, while solid state disks cannot fail. + * Solid state disks can store many times as much data as hard disk drives. + * /dev/sdais a hard disk device while /dev/ssda is a solid state disk. + * Solid state disks provide faster access to stored data than hard disks. +2. 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. +3. Which of the following types of bus can connect hard disk drives with the motherboard? + * The RAM bus + * The NUMA bus + * The CPU bus + * The SATA bus + * The Auto bus +4. 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? + * Ubuntu Linux LTS + * Raspbian + * Debian GNU/Linux + * CentOS + * openSUSE +5. 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. +6. Which of the following commands can be used to resolve a DNS name to an IP address? + * dnsname + * dns + * query + * host + * iplookup +7. Which of the following outputs comes from the command free? **TODO** + * Option A + * Option B + * Option C + * Option D + * Option E +8. What is true about the dmesg command? (Choose two.) + * It traces the execution of a command and shows each step the program carries out. + * It sends messages to the command lines of all current user sessions. + * It displays the content of the Linux kernel’s ring buffer. + * It immediately outputs all new messages written to the system journal. + * It might not display older information because it was overwritten by newer information. +9. Which of the following outputs could stem from the command last? + * `1 ls 2 cat text.txt 3 logout` + * `Password for user last changed at Sat Mar 31 16:38:57 EST 2018` + * `Last login: Fri Mar 23 10:56:39 2018 from server.example.com` + * `EXT4-fs (dm-7): mounted filesystem with ordered data mode. Opts: (null)` + * `root tty2 Wed May 17 21:11 - 21:11 (00:00)` +10. What is the UID of the user root? + * 1 + * -1 + * 255 + * 65536 + * 0 +11. Which permissions are set on a regular file once the permissions have been modified with the command chmod 654 file.txt? + * `drw-r-xr-­` + * `d―wxr-x-­` + * `Cwxr-x--x` + * `Crwxrw---x` + * `-rw-r-xr-` +12. 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. +13. Which of the following permissions are set on the /tmp/ directory? + * `rwxrwxrwt` + * `------rwX` + * `rwSrw-rw-` + * `rwxrwS--` + * `r-xr-X--t` +14. Which command adds the new user tux and creates the user’s home directory with default configuration files? + defaultuser tux + useradd -m tux + usercreate tux + useradd -o default tux + passwd -a tux +15. 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 users default shell +16. Which of the following tar options handle compression? (Choose two.) + * `-bz` + * `-z` + * `-g` + * `-j` + * `-z2` +17. What keyword is used in a shell script to begin a loop? +18. Which of the following commands creates an archive file work.tar from the contents of the directory ./work/? + * `tar --new work.tar ./work/` + * `tar -cf work.tar ./work/` + * `tar -create work.tgz -content ./work/` + * `tar work.tar < ./work/` + * `tar work > work.tar` +19. Which of the following keys can be pressed to exit less? + * l + * x + * e + * q + * ! +20. 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.) + * run test.sh + * ${test.sh} + * cmd ./test.sh + * ./test.sh + * bash test.sh +21. 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` +22. A directory contains the following files: `a.txt b.txt c.cxt` What would be the output of the following shell script? **CHECK SCRIPT** + ``` + for file in *.txt + do; + echo $file + done + + ``` + * a b + * c.cav + * a.txt + * a. txt b. txt +23. Which of the following commands will search for the file foo.txt under the directory /home? + * `search /home Cfile foo.txt` + * `search /home foo. txt` + * `find /home C file foo.txt` + * `find /home Cname foo.txt` + * `find /home foo.txt` +24. 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.shleads to this error: `bash: ./test.sh: Permission denied`. What should be done in order to successfully execute the script? + * 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. shinstead of ./test.sh. +25. 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. + * A set of changes to Linux which enable Linux to run on another processor architecture. diff --git a/certificates/essentials/readme.md b/certificates/essentials/readme.md index 88d2b00..6a658c3 100644 --- a/certificates/essentials/readme.md +++ b/certificates/essentials/readme.md @@ -13,3 +13,5 @@ The exercises from the official documentain are copy/pasted into seperate markdo * [Lesson 5](./lpi_essentials_lesson_05.md) Some additional exercises compiled by [sudomateo](https://github.com/sudomateo/lsa-i/tree/master/docs/linux-essentials) can be found in the [exercises_sudomateo.md](./exercises_sudomateo.md) file. + +Sample questions found online are compiled in [this](./example_questions.md) file.