UNPKG

bytee-quiz

Version:

Simple Quiz app powered by Vue.js and Spectre.css.

1,670 lines 81.2 kB
[ { "title": "Which parameter do you add to `ls` to view also hidden files?", "category": "lpic-101", "tags": ["command"], "kind": "single", "resolution": [ 3 ], "answers": [ { "content": "-h", "explanation": "ls -lh shows the size values in **h**uman readable format." }, { "content": "-l", "explanation": "ls -l is the list view." }, { "content": "-r", "explanation": "ls -r reversely orders the output (DESC)." }, { "content": "-a", "explanation": "ls -a shows hidden files starting with a dot." } ] }, { "kind": "single", "answers": [ { "content": "-b", "explanation": "-b is the bus centric view" }, { "content": "-v", "explanation": "Verbose displays more detailed information about the devices." }, { "content": "-t", "explanation": "Tree-like diagram view." }, { "content": "-k", "explanation": "Show kernel drivers handling the device and modules capable of handling it." }, { "content": "-s", "explanation": "Selection of devices." } ], "title": "Which parameter allows you to filter for devices (PCI-Bus) with lspci?", "category": "lpic-101", "tags": ["hardware"], "difficulty": "4", "resolution": [ 4 ] }, { "title": "How do you obtain the ip address of an network adapter in Linux?", "category": "lpic-101", "tags": ["network"], "kind": "single", "resolution": [ 0 ], "answers": [ { "content": "ip address", "explanation": "`ip address` or `ip a` is the correct answer." }, { "content": "ipconfig", "explanation": "`ipconfig` is a windows command." }, { "content": "route", "explanation": "With `route` you can change or look at the IP routing table." }, { "content": "arp", "explanation": "`arp` displays / manipulates the IPv4 neighbour cache. (Address resolution protocol)" }, { "content": "lsof -i", "explanation": "`lsof -i` lists files / processes with open ports." } ] }, { "title": "Which tools can be used to change the nice value of a running process?", "category": "lpic-101", "tags": ["command"], "kind": "multiple", "resolution": [ 2, 3 ], "answers": [ { "content": "nice", "explanation": "With nice you can set the nice value before running the application. `nice [OPTION] [COMMAND]`" }, { "content": "ps", "explanation": "ps lists the running processes." }, { "content": "renice", "explanation": "Correct! `renice -10 -p 123` would change the nice value of a running process with the PID 123 to -10." }, { "content": "top", "explanation": "Correct! `top` allows you to change the nice value too." }, { "content": "netstat", "explanation": "`netstat` shows you open ports, sockets and connections etc." } ] }, { "title": "Which file contains information on the CPU(s) and it's bugs? (Full path and filename)", "category": "lpic-101", "tags": ["proc", "files"], "difficulty": "8", "kind": "text", "resolution": [ "/proc/cpuinfo" ], "explanation": "`/proc/cpuinfo` contains information about the CPU(s) and lists known bugs, like Meltdown and Spectre.", "answers": [] }, { "title": "Which command generates the following output? (No parameters)", "explanation": "lsusb lists the USB devices connected to the computer.", "kind": "text", "difficulty": "3", "answers": [ ], "code_block": "Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub\nBus 007 Device 005: ID 1532:005c Razer USA, Ltd Razer DeathAdder Elite Mouse\nBus 007 Device 004: ID 0fd9:0060 Elgato Systems GmbH Stream Deck\nBus 007 Device 003: ID 1038:1724 SteelSeries ApS SteelSeries Rival 600\nBus 007 Device 002: ID 04b3:3025 IBM Corp. NetVista Full Width Keyboard", "category": "lpic-101", "tags": ["hardware"], "resolution": [ "lsusb" ] }, { "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "modprobe -r", "explanation": "With modprobe -r you unload a module." }, { "content": "insmod", "explanation": "insmod loads a module without it\"s dependencies. You probably want to use modprobe." }, { "content": "rmod", "explanation": "There is no rmod command. rmmod exists, but you probably want to use modprobe -r instead." }, { "content": "ldd", "explanation": "ldd shows the dynamic library dependencies of a command." } ], "title": "How do you unload a Linux module from the running Kernel?", "category": "lpic-101", "tags": ["kernel", "hardware"], "resolution": [ 0 ] }, { "title": "In which directory is the compiled Linux kernel normally located?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "1", "answers": [ { "content": "/sys", "explanation": "The /sys directory provides information to the kernel like /proc, but better structured." }, { "content": "/proc", "explanation": "The /proc mount point contains information about running processes and the Kernel." }, { "content": "/lib/modules", "explanation": "/lib/modules/$(uname -r) contains the kernel drivers." }, { "content": "/dev", "explanation": "Special or device files for physical devices." }, { "content": "/boot", "explanation": "The boot folder contains typically the system kernel (or /) and the boot loader." } ], "category": "lpic-101", "tags": ["kernel"], "resolution": [ 4 ] }, { "title": "Which partition type should an UEFI boot partition have?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "7", "answers": [ { "content": "8300", "explanation": "This is the default Linux partition type." }, { "content": "8200", "explanation": "This is the Linux Swap type" }, { "content": "0700", "explanation": "Windows NTFS/exFAT type." }, { "content": "4200", "explanation": "SFS / Windows 2000 dynamic extender partition maker." }, { "content": "EF00", "explanation": "EF00 is the Efi System Partition which is required for booting with UEFI and GPT." } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 4 ] }, { "title": "Which filesystem should the UEFI partition use?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "6", "answers": [ { "content": "NTFS", "explanation": "NTFS is the default Windows file system." }, { "content": "ext4", "explanation": "ext4 is a Linux file system." }, { "content": "btrfs", "explanation": "btrfs is a Linux file system." }, { "content": "FAT32", "explanation": "The UEFI specification mandates support for FAT16 and FAT32 file systems." }, { "content": "xfs", "explanation": "XFS is a Linux / Unix filesystem." } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 3 ] }, { "title": "Which of the following are Linux bootloaders?", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "5", "answers": [ { "content": "systemd-boot", "explanation": "systemd-boot is a simple UEFI boot manager" }, { "content": "mboot", "explanation": "mboot is a custom MicroPython bootloader for STM32 MCUs" }, { "content": "GRUB", "explanation": "GRUB is a Linux boot loader." }, { "content": "efibootmgr", "explanation": "efibootmgr is a tool to manipulate the UEFI Boot Manager (Bios)." }, { "content": "blkid", "explanation": "Prints block devices attributes" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 0, 2 ] }, { "title": "Which of the following is true? The initramfs normally contains ..", "explanation": "", "code_block": "", "kind": "single", "difficulty": "4", "answers": [ { "content": "files needed files for the system boot", "explanation": "The initramfs contains the needed files, e.g. drivers, firmware, scripts to boot the system." }, { "content": "the Linux Kernel", "explanation": "The Kernel can contain the initramfs, but not the other way around." }, { "content": "the Boot loader", "explanation": "The initramfs can make boot process more flexible (hooks etc.), but contains no bootloader." }, { "content": "the initial ramdisk for use with /sys, /proc and /dev", "explanation": "/sys, /proc and /dev are mounted during the boot (sysfs etc.)" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 0 ] }, { "title": "Which of the following are Linux init systems?", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "3", "answers": [ { "content": "systemd \"System and Service Manager\"", "explanation": "The systemd \"System and Service Manager\" is an init system. systemd itself is a software suite providing more software." }, { "content": "Upstart", "explanation": "Upstart is a now deprecated init system initiated by Ubuntu" }, { "content": "service", "explanation": "service is a command to control services in a System V Init environment" }, { "content": "systemctl", "explanation": "systemctl is the systemd command to control services and more." }, { "content": "System V Init", "explanation": "System V (SysV) was the most common Linux / Unix init system for a long time. Although there where several SysV Init replacement over the years most kept compatible with SysV." } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 0, 1, 4 ] }, { "title": "Where is the partition table located on a mass storage device with an MBR partition scheme?", "explanation": "", "code_block": "", "kind": "single", "difficulty": 0, "answers": [ { "content": "At the beginning of a partition", "explanation": "No, partitions can contain a Partition Boot Record (PBR / VBR)" }, { "content": "On multiple locations of the device", "explanation": "GPT stores cyclic redundancy checks (CRC) on multiple locations, MBR does not." }, { "content": "At the end of the storage device", "explanation": "No" }, { "content": "In an extended partition", "explanation": "MBR differentiates between primary, extended and logical partitions, but this has nothing to do with the location of the partition table." }, { "content": "At the beginning / First sector of the device", "explanation": "The MBR consists of 512 or more bytes and is located in the first sector of the device" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 4 ] }, { "title": "How many primary partitions can you have with an MBR partitioning scheme?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "1", "answers": [ { "content": "1", "explanation": "" }, { "content": "2", "explanation": "" }, { "content": "4", "explanation": "You can have up to four primary / extended partitions." }, { "content": "15", "explanation": "" }, { "content": "128", "explanation": "" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 2 ] }, { "title": "What is the maximum addressable storage space of a MBR partitioned hard disk with a 512 byte sector size?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "1024 GB", "explanation": "GB is 10^9 bytes, e.g. 1,000,000,000 bytes" }, { "content": "512 GB", "explanation": "" }, { "content": "2048 Gb", "explanation": "Gb = Gigabit" }, { "content": "2048 GiB", "explanation": "Correct, 2^32 x 512 bytes (~2TiB) is the maximum addressable storage size of MBR." }, { "content": "1024 GiB", "explanation": "" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 3 ] }, { "title": "How many partitions does GPT support?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "4", "explanation": "MBR supports up to 4 primary / extended partitions." }, { "content": "32", "explanation": "No" }, { "content": "64", "explanation": "No" }, { "content": "128", "explanation": "Correct, GUID Partition Table (GPT) supports up to 128 partitions." }, { "content": "256", "explanation": "No" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 3 ] }, { "title": "Which commands prints the Linux kernel message buffer?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "2", "answers": [ { "content": "uname", "explanation": "`uname -r` prints the Kernel release version." }, { "content": "klog", "explanation": "There is no such command, `klogd` is a daemon which logs Linux Kernel messages with syslogd." }, { "content": "kernellog", "explanation": "Not existing" }, { "content": "None, the kernel log can be found in a log file", "explanation": "As the kernel log starts, even before any filesystem is available, it's saved in a buffer and accessed by a command. On most distributions there are log files, where the Kernel messages are stored once the filesystem is ready." }, { "content": "dmesg", "explanation": "dmesg (display / driver message) in the command that prints the message buffer of the Kernel." } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 4 ] }, { "title": "Which of the following is true for systemd-journald?", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "5", "answers": [ { "content": "Stored in /var/log/messages", "explanation": "On certain distributions there is a copy of the log in this file with systemd, but originally it's not stored there." }, { "content": "Stored in /var/log/syslog", "explanation": "On certain distributions there is a copy of the log in this file with systemd, but originally it's not stored there." }, { "content": "Stored in /var/log/journal", "explanation": "The journal is stored in binary format in /var/log/journal" }, { "content": "The log is stored in text files", "explanation": "With systemd-journal the systems log is no longer stored in text files, but in binary format." }, { "content": "The logs are stored in binary format.", "explanation": "Correct, systemd-journal stores logs in a binray format (Journal File Format)" } ], "category": "lpic-101", "tags": ["init"], "resolution": [ 2, 4 ] }, { "title": "What kind of Kernel is the Linux one?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "5", "answers": [ { "content": "Microkernel", "explanation": "A microkernel is the near-minimum amount of software to implement an operating system and are often smaller than monolithic kernels." }, { "content": "Hybrid Kernel", "explanation": "A hybrid kernel tries to combine aspects of a micro- and a monolithic Kernel. The Windows NT Kernel is a prominent example." }, { "content": "Nanokernel", "explanation": "Nanokernel normally referenced to very small kernels (in terms of code), often it references also to a virtualization layer under a operating system (hypervisor)." }, { "content": "Exokernel", "explanation": "With an Exokernel, software can communicate with hardware much more directly." }, { "content": "Monolithic Kernel", "explanation": "Correct, the Linux Kernel is a monolithic one, handling most things, like process management, in the kernel space." } ], "category": "lpic-101", "tags": ["kernel"], "resolution": [ 4 ] }, { "title": "Which of the following commands restarts a Linux system on a SysV system immediately?", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "3", "answers": [ { "content": "shutdown -h now", "explanation": "This would shut down the system." }, { "content": "init 6", "explanation": "Correct, switching to the sixth runlevel with SysVInit reboots a system." }, { "content": "reboot", "explanation": "Correct, the reboot command immediately reboots the system." }, { "content": "restart", "explanation": "This command is not existing" }, { "content": "init 0", "explanation": "This would shutdown the system" }, { "content": "shutdown -r 1", "explanation": "This would reboot the system in one minute, not immediately!" } ], "category": "lpic-101", "tags": ["init"], "resolution": [ 1, 2 ] }, { "title": "How do you start the apache2 service with systemd without a reboot?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "systemctl enable apache2", "explanation": "This would enable the service, but not start it directly (only after reboot)." }, { "content": "service apache2 start", "explanation": "This is the old SysVInit way of starting a service." }, { "content": "start apache2", "explanation": "This were old SysVInit scripts (refering to serviec) for starting a service." }, { "content": "systemctl start apache2", "explanation": "Correct, systemctl start apache2 starts the service, systemctl stop apache2 would stop it (you can also add .service to the name)." }, { "content": "init 5", "explanation": "With SysVInit this would change to the fifth run level of the system." } ], "category": "lpic-101", "tags": ["init"], "resolution": [ 3 ] }, { "title": "In which file the default runlevel for a SysVInit system is set?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "/etc/init", "explanation": "There is no such file" }, { "content": "/etc/init.d", "explanation": "/etc/init.d is a folder containing the shell scripts to control services." }, { "content": "/etc/fstab", "explanation": "The fstab contains the static information about the filesystems." }, { "content": "/etc/inittab", "explanation": "Correc,t the inittab contains the run level configuration. For example: id:3:initdefault: would tell init to boot into run level 3 by default." }, { "content": "/boot/grub/grub.cfg", "explanation": "This is the configuration file of the bootloader, not the init system." } ], "category": "lpic-101", "tags": ["init"], "resolution": [ 3 ] }, { "title": "How do you power down a system in 5 minutes?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "2", "answers": [ { "content": "init 0", "explanation": "This would immediately shut down the system." }, { "content": "init 6", "explanation": "This would immediately reboot the system." }, { "content": "powerdown -h 300", "explanation": "This command is not existing." }, { "content": "shutdown -h 5", "explanation": "Correct, this would shut down the system in 5 minutes." }, { "content": "shutdown -h 300", "explanation": "This would power off the system in 300 minutes." } ], "category": "lpic-101", "tags": ["init"], "resolution": [ 3 ] }, { "title": "How do you send a broadcast message to all logged in users? (Without files)", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "3", "answers": [ { "content": "echo \"Hello\"", "explanation": "This just outputs Hello to the standard output." }, { "content": "wall \"Hello\"", "explanation": "This would try to open and send a file called \"Hello\"." }, { "content": "echo \"Hello\" | wall", "explanation": "You can pipe the message to wall to send a message to all logged in users." }, { "content": "wall", "explanation": "When you just type wall, you can enter your message and stop it with Ctrl + D" }, { "content": "netmsg \"Hallo\"", "explanation": "This would be a windows command." } ], "category": "lpic-101", "tags": ["command"], "resolution": [ 2, 3 ] }, { "title": "Which folder generally would contain the apache2 / httpd executable on Linux?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "4", "answers": [ { "content": "/lib", "explanation": "The lib folder normally contains the shared libraries to boot the system, the kernel modules and the most important libraries." }, { "content": "/usr/lib", "explanation": "The lib folder contains libraries." }, { "content": "/sbin", "explanation": "Like /bin this holds commands needed to boot the system, but are normally not executed by normal users (like fdisk)." }, { "content": "/bin", "explanation": "The /bin directory normally contains executable programs needed in single user mode and to boot the system up." }, { "content": "/usr/bin", "explanation": "As the apache2 executable is not mandatory for a system boot, it is normally contained in /usr/bin." } ], "category": "lpic-101", "tags": ["filesystem"], "resolution": [ 4 ] }, { "title": "Which file configures the GRUB (v2) boot loader?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "5", "answers": [ { "content": "/boot/grub.cfg", "explanation": "No" }, { "content": "/boot/loader/loader.conf", "explanation": "This is the configuration file for systemd-boot (Gummiboot before)." }, { "content": "/boot/grub/menu.lst", "explanation": "This was the config file for Grub Version 1" }, { "content": "/boot/grub/grub.conf", "explanation": "No, the ending is different for this file." }, { "content": "/boot/grub/grub.cfg", "explanation": "Correct, the GRand Unified Bootloader configuration can be found there since version 2 (1.98)" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 4 ] }, { "title": "How do you enable an existing swap partition?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "mkswap", "explanation": "This would create a swap partition." }, { "content": "onswap", "explanation": "No." }, { "content": "swapon", "explanation": "Correct, swapon activates an swap partition. (Reminder: Partition type 82)" }, { "content": "free", "explanation": "free shows the free memory and swap space." }, { "content": "swdisk", "explanation": "This command does not exist." } ], "category": "lpic-101", "tags": ["filesystem"], "resolution": [ 2 ] }, { "title": "Which partition type code should be used for a swap partition?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "6", "answers": [ { "content": "83", "explanation": "No, this is the partition scheme for Linux" }, { "content": "42", "explanation": "No, this type is used by Windows 2000 special partitions." }, { "content": "82", "explanation": "Correct, a swap partition should use the partition code 82." }, { "content": "ef", "explanation": "ef00 is an EFI System Partition" }, { "content": "07", "explanation": "This is partition type is used for Windows NTFS and exFAT systems." } ], "category": "lpic-101", "tags": ["filesystem"], "resolution": [ 2 ] }, { "title": "Which directory normally contains the initramfs / initrd file? (not /)", "explanation": "The initramfs / initrd normally is located in the boot directory. (/ is also allowed, but not common)", "code_block": "", "kind": "text", "difficulty": 0, "answers": [ ], "resolution": [ "/boot" ], "category": "lpic-101", "tags": ["filesystem"] }, { "title": "Which manual shows information about the Linux filesystem hierachy? (Name of the manual page only)", "explanation": "man hier shows the description of the Linux filesystem hierachy.", "code_block": "", "kind": "text", "difficulty": "7", "answers": [ { "content": "", "explanation": "" } ], "category": "lpic-101", "tags": ["filesystem"], "resolution": [ "hier" ] }, { "title": "Which boot loader probably uses the following syntax?", "explanation": "", "code_block": "title Gentoo 5.1.0\nlinux /vmlinuz-5.1.0-gentoo\ninitrd /initramfs-genkernel-x86_64-5.1.0-gentoo\noptions domdadm dolvm crypt_root=/dev/md/gentoo:root real_root=/dev/mapper/crypt-root root=/dev/mapper/crypt-root rootfstype=ext4 root_trim=yes \n", "kind": "single", "difficulty": "7", "answers": [ { "content": "GRUB 1", "explanation": "No, the GRUB 1 config consists of a single file, located normally in /boot/grub/menu.lst" }, { "content": "GRUB 2", "explanation": "No, the GRUB 1 config consists of a single file, located normally in /boot/grub/grub.cfg" }, { "content": "Lilo", "explanation": "No, the lilo.conf used equal signs between their values." }, { "content": "systemd-boot", "explanation": "Correct, this is a definition of a boot loader entry for systemd-boot (previously Gummiboot)" }, { "content": "rEFInd", "explanation": "No, the rEFInd uses an ini like syntax" } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 3 ] }, { "title": "How do you create an LVM2 volume group?", "category": "lpic-101", "tags": ["filesystem"], "explanation": "", "code_block": "", "kind": "single", "difficulty": "7", "answers": [ { "content": "pvcreate", "explanation": "pvcreate initializes a (physical) volume for use by LVM." }, { "content": "lvcreate", "explanation": "lvcreate creates a logical volume on an existing volume group." }, { "content": "mkvg", "explanation": "LVM2 uses create, not make." }, { "content": "vgcreate", "explanation": "Correct, vgcreate creates a volume group. You have to initialize a physical volume with pvcreate first." }, { "content": "mkfs", "explanation": "mkfs - MaKe FileSystem formats a partition." } ], "resolution": [ 3 ] }, { "title": "How do you generate the GRUB configuration? (Version 2, Command only, no parameters)", "category": "lpic-101", "tags": ["boot"], "explanation": "grub-mkconfig -o /boot/grub/grub.cfg - grub-mkconfig generates the GRUB2 configuration and prints it to the standard output.", "code_block": "", "kind": "text", "difficulty": "7", "answers": [ ], "resolution": [ "grub-mkconfig" ], "comment": "" }, { "title": "How do you install Grub into the MBR of the first mass storage device?", "category": "lpic-101", "tags": ["boot"], "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "grub-install /dev/sdb", "explanation": "This would install GRUB into the MBR of the second hard drive." }, { "content": "install-grub /dev/sda", "explanation": "The other way around." }, { "content": "grub-install --target=x86_64-efi --efi-directory=/boot/EFI", "explanation": "This would install GRUB for UEFI." }, { "content": "update-grub /dev/sda", "explanation": "No" }, { "content": "grub-install /dev/sda", "explanation": "Correct, this would install GRUB into the MBR of the first mass storage device." } ], "resolution": [ 4 ] }, { "title": "What would be the best way to print out the MBR of the first mass storage device?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "5", "answers": [ { "content": "hexdump -C -n 512 /dev/sda", "explanation": "Correct, this would dump the first 512 bytes of the first mass storage device and display it with hexdump in ASCII mode." }, { "content": "dd if=/dev/sda of=mbr.txt bs=512 count=1", "explanation": "This would save the MBR to a mbr.txt file." }, { "content": "cat /dev/sda", "explanation": "Bad idea" }, { "content": "head -n 512 /dev/sda", "explanation": "This would output the first 512 lines the device, probably containing the MBR, but a lot of other junk too." }, { "content": "tail -n 512 /dev/sda", "explanation": "This would output the last 512 lines of the device." } ], "category": "lpic-101", "tags": ["boot"], "resolution": [ 0 ] }, { "title": "Which file ending do shared libraries have on Linux?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": ".dll", "explanation": "This would be the windows version." }, { "content": ".sl", "explanation": "No" }, { "content": "None (Linux files have no file ending).", "explanation": "No, certain files do have file endings in Linux." }, { "content": ".ko", "explanation": "This would be kernel drivers / modules." }, { "content": ".so", "explanation": "Correct. shared libraries end with .so (shared object)" } ], "category": "lpic-101", "tags": ["library"], "resolution": [ 4 ] }, { "title": "Which command probably generated the following output? (Command only)", "category": "lpic-101", "tags": ["library"], "explanation": "ldd prints shared object / library dependencies. `ldd $(which cp)`", "code_block": "linux-vdso.so.1 (0x00007ffe5e995000)\nlibacl.so.1 => /lib64/libacl.so.1 (0x00007fd72d962000)\nlibattr.so.1 => /lib64/libattr.so.1 (0x00007fd72d75c000)\nlibc.so.6 => /lib64/libc.so.6 (0x00007fd72d587000)\n/lib64/ld-linux-x86-64.so.2 (0x00007fd72dbc4000)", "kind": "text", "difficulty": "7", "answers": [ ], "resolution": [ "ldd" ] }, { "title": "Which command shows you printable character sequences in an Linux executable?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "8", "answers": [ { "content": "file", "explanation": "file determines the file type." }, { "content": "cat", "explanation": "concatenate just prints the whole file. (including non-printable chars)" }, { "content": "less", "explanation": "less just dumps the whole file (including non-printable chars) in an non-editq vi frontend." }, { "content": "hexdump", "explanation": "hexdump, while a very useful tool, also displays the whole file contents in hexadecimal (or decimal, octal or ascii)" }, { "content": "strings", "explanation": "Correct, strings prints printable characters in files with at least 4 characters by default. Also useful for data files etc." } ], "category": "lpic-101", "tags": ["library"], "resolution": [ 4 ] }, { "title": "Which file probably contains the following content?", "explanation": "", "code_block": "## Major bug fix updates produced after the final release of the\n## distribution.\ndeb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted\n# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted\n\n## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu\n## team. Also, please note that software in universe WILL NOT receive any\n## review or updates from the Ubuntu security team.\ndeb http://archive.ubuntu.com/ubuntu/ bionic universe\n# deb-src http://archive.ubuntu.com/ubuntu/ bionic universe\ndeb http://archive.ubuntu.com/ubuntu/ bionic-updates universe", "kind": "single", "difficulty": "2", "answers": [ { "content": "/etc/apt/sources.list", "explanation": "Correct, the sources.list contains the mirror servers for the apt package management system on Debian, Ubuntu etc." }, { "content": "/etc/yum.repos.d/centos-base.repo", "explanation": "No, this one of the configuration files for CentOS." }, { "content": "/etc/pacman.d/mirrorlist", "explanation": "This would be the mirror selection file for Arch Linux." }, { "content": "/etc/nsswitch.conf", "explanation": "No, that's the configuration file for the GNU Name Service Switch functionality." }, { "content": "/etc/portage/make.conf", "explanation": "This is the configuration file for the Gentoo portage / emerge system." } ], "category": "lpic-101", "tags": ["package"], "resolution": [ 0 ] }, { "title": "How can you get more information, like the maintainer, about an apt package on Debian?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "apt-cache show pkg", "explanation": "apt-cache show displays the package records for the given package(s)." }, { "content": "apt-cache info pkg", "explanation": "It would be info on yum / dnf, not on apt." }, { "content": "apt-cache search pkg", "explanation": "This would display the package and it's description, but not the whole information." }, { "content": "apt-info pkg", "explanation": "This command is not existing" }, { "content": "apt-show pkg", "explanation": "This command is not existing" } ], "category": "lpic-101", "tags": ["package"], "resolution": [ 0 ] }, { "title": "How can you delete an package including it's configuration?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "apt-get remove pkg", "explanation": "This would uninstall the package, but leave the configuration file on the system." }, { "content": "apt-get clean pkg", "explanation": "apt-get clean (without pkg) removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial" }, { "content": "apt-get purge pkg", "explanation": "Purge is identical to remove, but also deletes configuration files too (not in home directories)." }, { "content": "apt-get force-remove pkg", "explanation": "Not existing" }, { "content": "apt-get autoclean pkg", "explanation": "apt-get autoclean would remove packages which are no longer in use." } ], "category": "lpic-101", "tags": ["package"], "resolution": [ 2 ] }, { "title": "How can you reconfigure the available languages on a Debian system?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "4", "answers": [ { "content": "apt-get reinstall language", "explanation": "No, there is no package language." }, { "content": "dpkg-reconfigure locales", "explanation": "Correct, this would open a window asking you to select the languages you want to have available." }, { "content": "vim /etc/locale.gen", "explanation": "The locale-gen command, which you need to execute afterwards, is missing and you generally should prefer using dpkg-reconfigure." }, { "content": "locale-gen", "explanation": "This would generate the locales based on the /etc/locale.gen file, but not add new languages." }, { "content": "export LANG=\"my_new_language\"", "explanation": "This would overwrite the LANG environment variable (/etc/locale.conf) to a new language, but not add any new." } ], "category": "lpic-101", "tags": ["package"], "resolution": [ 1 ] }, { "title": "How can you list all installed packages on an Debian system?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "4", "answers": [ { "content": "apt-get installed", "explanation": "This is not existing." }, { "content": "apt-cache pkgnames", "explanation": "This shows all available packages." }, { "content": "apt-cache list", "explanation": "There is no such operation, there is `apt list --installed` in newer Ubuntu versions (14.04)." }, { "content": "dpkg list", "explanation": "dpkg is not having the same syntax as apt, so you need to use parameters." }, { "content": "dpkg -l", "explanation": "dpkg -l shows the installed packages, as an alternative you can also use dpkg --get-selections." } ], "category": "lpic-101", "tags": ["package"], "resolution": [ 4 ] }, { "title": "Which of the following commands belong to the Debian package management system?", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "3", "answers": [ { "content": "apt-get", "explanation": "With apt-get you can manage the systems packages." }, { "content": "apt-cache", "explanation": "With apt-cache you can find information on packages." }, { "content": "apt-remove", "explanation": "There is no such command" }, { "content": "yum", "explanation": "This is the RHEL / Centos package manager (Before Version 8)" }, { "content": "dpkg-reconfigure", "explanation": "With dpkg-reconfigure you can reconfigure already installed packages." }, { "content": "zypper", "explanation": "This is the package manage of Suse." }, { "content": "rpm", "explanation": "rpm is the RPM package manager (like dpkg) for distributions using rpm files." } ], "category": "lpic-101", "tags": ["package"], "resolution": [ 0, 1, 4 ] }, { "title": "How do you update your system with yum? Shows the most suitable one.", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "yum update && yum upgrade", "explanation": "No, though this would update and upgrade your system, with yum you only have to use one command. yum update and upgrade (deprecated) is the same. This would be apt-get way." }, { "content": "yum update", "explanation": "This updates the package lists and upgrades every currently installed package on the system." }, { "content": "yum distupgrade", "explanation": "This does not exist." }, { "content": "yum updatepackages", "explanation": "This does not exist." }, { "content": "yum -Syu", "explanation": "This does not exist." } ], "category": "lpic-101", "tags": ["package"], "resolution": [ 1 ] }, { "title": "Which command lists the files in an installed RPM packages", "explanation": "", "code_block": "", "kind": "single", "difficulty": "5", "answers": [ { "content": "rpm -ql", "explanation": "rpm -q -l shows you the files from an installed rpm." }, { "content": "rpm2cpio", "explanation": "This would extract an cpio archive from the package (but you would still need to extract that too)." }, { "content": "rpm --list-files", "explanation": "This is not existing." }, { "content": "rpm --query-files", "explanation": "This is not existing." }, { "content": "rpm -i", "explanation": "This would install an rpm package." } ], "category": "lpic-101", "tags": ["package", "yum"], "resolution": [ 0 ] }, { "title": "To which package manager the following snippet probably belongs? (Command only)", "explanation": "yum the package manager of RHEL or CentOS (Before Version 8) is using this configuration format for it's repository configuration.", "code_block": "[base]\nname=CentOS-$releasever - Base\nmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra\n#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7", "kind": "text", "difficulty": "4", "answers": [ ], "category": "lpic-101", "tags": ["package", "yum"], "resolution": [ "yum" ] }, { "title": "Which of the following files (if existing) are normally loaded during the startup of the Bourne-Again Shell (bash)?", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "5", "answers": [ { "content": "/etc/skel", "explanation": "No, the /etc/skel directory contains the skeleton files for newly created users with home directory (They are copied there)." }, { "content": "/etc/profile", "explanation": "Correct, the /etc/profile file is the base configuration loaded not only for the bash, but for most shells." }, { "content": "~/profile", "explanation": "No, there is a dot missing. If existing ~/.profile is loaded too." }, { "content": "~/.bashrc", "explanation": "Correct this is the Bash startup file of the user, where they can override settings and add their own things." }, { "content": "/etc/bash", "explanation": "This is not existing, it's either /etc/bashrc or a configuration directory for the bash." }, { "content": "~/.xinitrc", "explanation": "The ~/.xinitrc is used to run (GUI) programs and set environment variables on the X server (xorg) startup." } ], "category": "lpic-101", "tags": ["bash"], "resolution": [ 1, 3 ] }, { "title": "How do you delete an Variable on the bash? (Command only)", "explanation": "", "code_block": "", "kind": "single", "difficulty": "3", "answers": [ { "content": "remove", "explanation": "There is no such command." }, { "content": "rm", "explanation": "This would delete files." }, { "content": "unset", "explanation": "With unset you delete an environment variable from the shell." }, { "content": "clear", "explanation": "clears the terminal screen (like Ctrl + L)" }, { "content": "uname", "explanation": "Prints system and Kernel information" } ], "category": "lpic-101", "tags": ["bash"], "resolution": [ 2 ] }, { "title": "How would you extend the list of directories, where the shell is looking for executable files, with your users \"~/bin\" folder?", "explanation": "", "code_block": "", "kind": "single", "difficulty": "4", "answers": [ { "content": "expand PATH:~/bin", "explanation": "expand converts tabs to spaces." }, { "content": "export PATH:~/bin", "explanation": "It's KEY=Value" }, { "content": "export PATH=$PATH;~/bin", "explanation": "The path variable is using the colon for separation" }, { "content": "export $PATH=PATH:~/bin", "explanation": "If ever working (not allowed variable name) this would set the content of your PATH variable as an variable with the text PATH:~/bin" }, { "content": "export PATH=\"$PATH:~/bin\"", "explanation": "This extends the PATH variable with your users ~/bin folder." }, { "content": "export PATH=\"PATH:~/bin\"", "explanation": "This would screw up your PATH variable with the text PATH and your users bin folder." } ], "category": "lpic-101", "tags": ["bash"], "resolution": [ 4 ] }, { "title": "Which Environment Variable holds the language configuration for the shell? (Name only)", "explanation": "LANG is the correct answer, you can print it with echo $LANG", "code_block": "", "kind": "text", "difficulty": "4", "answers": [ ], "resolution": [ "LANG" ], "category": "lpic-101", "tags": ["bash"] }, { "title": "How can you display all environment variables?", "explanation": "", "code_block": "", "kind": "multiple", "difficulty": "4", "answers": [ { "content": "echo *", "explanation": "This would display all files and directories in the current folder." }, { "content": "echo $?", "explanation": "This would display the exit code of the last command." }, { "content": "export *", "explanation": "This would try to export all files to an environment variable (empty Strings)." }, { "content": "set", "explanation": "set without any parameters prints all local-, global environment variables and definitions." }, { "content": "env", "explanation": "Correct env without options will print the Environment variables." } ], "category": "lpic-101", "tags": ["bash"], "resolution": [ 3, 4 ] }, { "title": "Which command shows you the full path of a command (e.g. /bin/ls)?", "category": "lpic-101", "tags": ["bash"], "explanation": "`which` shows the full path of commands. `whereis` would also show you other paths (like to the man page)", "code_block": "", "kind": "text", "difficulty": "3", "answers": [ ], "resolution": [ "which" ] }, { "title": "In which file is the users bash h