linux linkedin assessment answers
1. What is the difference between the == and =~ comparison operators when used in BASH double square bracket if conditionals?
- The =~ operator performs a string comparison; == performs a regex comparison.
- The == operator performs a string comparison; =~ performs a glob pattern comparison.
- There is no =~ operator in BASH if conditionals.
- The == operator performs a string comparison; =~ performs a regex comparison.
2. What issue might a user have when they mount a filesystem by partition path such as /dev/sda1 in the /etc/fstab file?
- The user may run out of device letters
- There are no issues with referring to partitions by their partition path.
- The device order may change on boot, resulting in a system that will not boot properly.
- It is more difficult identifying mounted devices by partition path.
3. Which of these features is missing from the Bash language?
- obiect orientation
- debug traps
- extended regular expression conditionals
- associative arrays
4. Which feature does LVM2 included in most Linux distributions not support?
- volume striping
- reducing LV size while mounted
- volume mirroring
- increasing LV size while mounted
5. What is the job of the NetworkManager daemon?
- It attempts to keep an active network connection available at all times.
- It is a command-line tool that manages network connections.
- It is a graphical tool that manages network connections, including bonding and wireless networks.
- It is a security service that manages user access control of local network-aware services.
6. In BASH parsing, which expansion happens first?
- word splitting
- filename expansion (globbing)
- brace expansion
- variable expansion
7. When pattern matching using a glob or regular expression, how many characters does a character set match?
- zero or one
- one
- one or more
- any number of characters
8. What would this sed command do?
sed
-E
's/[a-z]{4}/(&)/'
textfile.txt
- It would substitute the letter with an ampersand (&).
- It would replace all letters in the textfile.txt file with ampersands (&).
- It would replace the first four letters with an ampersand (&).
- It would place parentheses around the first four letters of each line
of textfile. txt.
9. What would you type to list all systemd service unit files, whether they are enabled or not?
- chkconfig–list-all
- systemctl list-unit-files -at service
- systemctl list-unit-files -t service
- systemctllist-services
11. Using a systemd-based distribution, you want to restrict the cron service from running either automatically or manually. Which command would you run?
- systemctl stop crond
- systemctl disallow crond
- systemctl mask crond
- systemctl disable crond
12. What is not inherited by a child process?
- environmental variables
- userid
- shell alases
- scheduling priority
13. If the active partition table and the drive's partition table do not match, which command forces the kernel to reread the partition table on the drive?
- fdisk -1
- parted
- diskprobe
- partprobe
14. To search from the current cursor position up to the beginning of the file using VIM, type _____ and then the search criteria.
- \
- /search
- /
- ?
15. Which option would you choose to force grep to use a basic regular expression (BRE)?
- grep -G
- grep -e
- grep -E
- grep -B