Linux LinkedIn Skill Assessment Answer

Q1. To mount a drive by its ID, what command would you use first to retrieve it?

  1. df -h
  2. listid
  3. ls -l
  4. blkid✔️

Q2. Linux file access control lists (ACLs) are _.

  1. discretionary access control system permissions layered over standard Linux permissions✔️
  2. mandatory access control system permissions layered over standard Linux permissions
  3. a type of firewall for Linux
  4. the same as standard Linux permissions

Q3. When using iproute2, how do you show routing information for an IPv6 network?

  1. route -ipv6
  2. route
  3. ip -6 route show✔️
  4. ip route show

Q4. What does this command string do?

find / -size +10M -exec ls -l {} ;
  1. It finds all files using ls -l and hands them off to the find command to display.
  2. It finds all files older than 10 minutes and long lists them using the ls command.
  3. It finds all files larger than 10 MB and long lists them using the ls command.✔️
  4. It uses the ls command to find all files in the filesystem matching the {} wildcard.

Q5. What would this locate command show?

locate --regexp '^/usr.*pixmaps.*jpg$'
  1. all files in a directory named pixmaps
  2. all files ending in “.jpg”
  3. all file paths that start with “/usr”, include the word “pixmaps”, and end with “.jpg”✔️
  4. all file paths that include “/usr/pixmaps” and end with “.jpg”

Q6. Which command allows you to do packet analysis from the command line?

  1. wireshark
  2. ethtool
  3. netstat
  4. tcpdump✔️

Q7. Which command will tell you how long a system has been running?

  1. log
  2. uptime✔️
  3. runtime
  4. access

Q8. How would you describe PCP (Performance Co-Pilot)?

  1. It is an application testing suite used to profile programming code.
  2. It is a local command used for monitoring local system resources in real time.
  3. It is a set of tools, services, and libraries for gathering and analyzing performance measures.✔️
  4. It is a tool designed to change system configuration for purposes of optimization.

Q9. You want to resolve a long list of DNS names using dig. What should you do?

  1. Create a text file including all names and use the -f option of dig.✔️
  2. Type in each query manually.
  3. Write a shell script to send multiple dig queries to the DNS server.
  4. Save the DNS names in an SQL database and process it with dig.

Q10. What would this command output?

ps -e --format uid,pid,ppid,%cpu,cmd
  1. the user ID, process ID, parent process ID, CPU usage, and command name of a process✔️
  2. the user ID, group ID, parent process ID, CPU usage, and command name of a process
  3. the UUID, process ID, parent process ID, CPU usage, and command name of a process
  4. all of these answers

Q11. Which command in Bash executes the last line in the shell history that starts with ls?

  1. !
  2. !!
  3. !*
  4. !ls✔️

Q12. The ssh-copy-id command copies _ to the remote host.

  1. both private and public keys
  2. the ssh public key✔️
  3. the ssh private key
  4. a fingerprint file

Q13. What command is used to determine the amount of disk usage for a directory?

  1. find
  2. fdisk
  3. du✔️
  4. df

Q14. A backup drive was created using dd to make a bit-for-bit copy. When the drive is inserted into an iSCSI target before it is booted up, the data appears to be missing. What happened?

  1. The backup drive is corrupted and needs to be re-created.
  2. When the backup drive was duplicated, the label was as well. When booted, the system mounted the old duplicated drive by its identical label.✔️
  3. There is a conflict between the physical location of the backup drive and the original drive.
  4. The backup process went wrong, and the old drive was duplicated over the original drive.

Q15. What is the key difference between a redirect (>) and piping to the tee command?

  1. The tee command sends output only to STDOUT and STDERR.
  2. A redirect sends output to STDOUT and a file, whereas a tee sends output only to STDOUT.
  3. Nothing, they are the same.
  4. The tee command sends output to STDOUT and a file, whereas a redirect sends output only to a file.✔️

Q16. What does the /etc/nsswitch.conf file manage?

  1. priority of one DNS server over another
  2. per network interface DNS server configuration
  3. alternative DNS services
  4. sources for name service information✔️

Q17. Assume the variable myNumber holds a string consisting of 10 digits. What will this command output?

echo $myNumber | sed -e 's/^[[:digit:]][[:digit:]][[:digit:]]/(&)/g'
  1. It will only match digits—and since the string has only digits, the command will output the same number without changes.
  2. It will output the same 10-digit number, but every digit will be inside parentheses.
  3. It will output the entire 10-digit number inside parentheses.
  4. It will output the same 10-digit number, but the first 3 digits will be inside parentheses.✔️

Q18. Packages can be downloaded but not installed with yum or dnf by specifying which option?

  1. None of these answers. yum does not support downloading packages without installing them.
  2. –downloaddir
  3. -d
  4. –downloadonly✔️

Q19. What character class is equal to this set?


  1. [[:alnum:]]
  2. [[:digit:]]✔️
  3. [[:alpha:]]
  4. [[:num:]]

Q20. When archiving files, which command will preserve all file attributes including ACLs and SELinux security context?

  1. zip
  2. tar✔️
  3. archive
  4. gzip

Q21. In a systemd-based OS, you can change the system hostname by editing /etc/hostname manually and then doing what?

  1. Restart dhcpd.
  2. Run /etc/hostname.
  3. Nothing, the system notices automatically.✔️
  4. Notify systemd to update it by restarting the systemd-hostnamed service.

Q22. What command would you use to resize an LVM volume group to include an additional physical volume?

  1. vgadd
  2. vgresize
  3. vgappend
  4. vgextend✔️

Q23. When would this system cron job run its task?

0 1 * * *

  1. every minute of the hour
  2. every hour of every day
  3. every day at 1:00 AM✔️
  4. only on Mondays

Q24. ifconfig has been deprecated. What command is now recommended for changing IP addresses in the live config?

  1. netconf
  2. ipconfig
  3. ipman
  4. ip✔️

Q25. You are managing an Apache web server on a system using SELinux. By default it cannot read personal webpages in users’ home directories. What SELinux boolean would you set to allow this?

  1. apache_enable_homedirs
  2. httpd_enable_userdirs
  3. httpd_enable_homedirs✔️
  4. httpd_enable_userhome_dirs

Q26. Why doesn’t passwd -l keep a user from logging in via other methods?

  1. The passwd command is not used for locking passwords.
  2. There is no password -l option.
  3. It locks only the password, not the account, so users can still authenticate with keys or other methods.✔️
  4. It does lock the account, keeping users from logging in even if they are using other authentication methods.

Q27. In the Bash shell, what is the difference between piping into | and piping into |&?

  1. Piping into | pipes both stdout and stderr. Piping into |& pipes only stderr.
  2. Piping into | pipes stdout. Piping into |& pipes stdout and stderr.✔️
  3. Piping into | pipes both stdout and stderr. Piping into |& pipes only stdout.
  4. Piping into | pipes stdout. Piping into |& pipes all open file descriptors.

Q28. Why is the passwd command able to modify the /etc/passwd file?

  1. The kernel identifies it as one of the names of extended commands.
  2. It has the same name as the file it modifies.
  3. It has the SUID permission mode and is owned by root.✔️
  4. It is a system administration command.

Q29. When a user deletes a file using the rm command, Linux will _.

  1. always ask for confirmation
  2. back up the file before it deletes the file
  3. ask for confirmation if configured to do so✔️
  4. never ask for confirmation

Q30. What is a major advantage of using Logical Volume Management (LVM)?

  1. Access to a drive is faster than with standard partitions.
  2. Volumes can be resized smaller without unmounting them.
  3. Repairing filesystem errors is easier than with standard partitions.
  4. Volumes can be resized even if the free space is not contiguous.✔️

Q31. What is one major difference between brace expansion and globs?

  1. Globs create a list; brace expansion matches pattern.
  2. Brace expansion requires files to exist; globs do not.
  3. Brace expansion creates a list; globs match the list of pathnames.✔️
  4. Globs get processes first and brace expansion later.

Q32. To remove all ACLs from a directory , use setfacl with which options?

  1. -d
  2. -k
  3. -b✔️
  4. -x

Q33. Which choice will not print “Hello World” in the terminal?

  1. A
myVar = 5
[[ $myVar -lt 10 ]] && echo " Hello World"
  1. B✔️
myVar = 5
[[ $myVar -lt 10 ]] || echo " Hello World"
  1. C✔️
myVar = 5
[[ $myVar -gt 10 ]] && echo " Hello World"
  1. D
myVar = 5
[[ $myVar -gt 10 ]] || echo " Hello World"

Q34. What is not inherited by child process?

  1. shell aliases✔️
  2. userid
  3. environmental variables
  4. scheduling priority

Q35. What NFS option allows the root user to access NFS shares as the root user?

  1. no_admin_squash
  2. no_root_squash
  3. allow_root_access✔️
  4. all_squash

Q36. You send an email to a remote client using the following syntax. What will be in the body of the email?

date | mail -s "This is a remote test"
  1. “This is a remote test”
  2. the date, the time, and the words “This is a remote test”
  3. The email subject shows “This is a remote test” but the body of the email will be empty.
  4. the current date and time✔️

Q37. What is the /etc/hosts file used for?

  1. resolving the local name
  2. blocking sites using iptables
  3. setting the hostname
  4. configuring DNS name servers✔️

Q38. In an extended regular expression, you would use (pattern){3} to match three instances of the pattern. How would you match the same thing with an extended glob?

  1. 3(pattern)
  2. {0,3}(pattern}
  3. Occurrence quantifiers are not supported in Bash’s version of extended globs, so this is not possible.✔️
  4. {3}(pattern})

Q39. When configuring a Samba share, how would the engineering group be specified in the smb.conf?

  1. Samba uses Linux operating system groups from the /etc/group file; just specify the group name.
  2. It would be preceded by a percent sign (%), such as %engineers.
  3. Use the group name by itself; Samba checks for its existence.
  4. It would be preceded by an @ symbol, such as @engineering.✔️

Q40. To configure the Kerberos client, which command should you use to import the keytab file?

  1. krb5-workstation
  2. ktutil✔️
  3. pam_krb5
  4. kdb5_util

Q41. To search from the current cursor position up to the beginning of the file using VIM, type _ and then the search criteria.

  1. ?✔️
  2. /
  3. /search

Q42. What is the job of the NetworkManager daemon?

  1. It is a graphical tool that manages network connections, including bonding and wireless networks.
  2. It is a security service that manages user access control of local network-aware services.
  3. It attempts to keep an active network connection available at all times.
  4. It is a command-line tool that manages network connections.✔️

Q43. Why might would you use the usermod command ?

  1. to log out a user
  2. to lock a user’s account
  3. to change global user account settings✔️
  4. to set a user’s password

Q44. Extending an LVM volume group does what to the formatted filesystem?

  1. It prepares the filesystem for use by defragmenting it.
  2. It resizes the filesystem to match the volume group size.
  3. It does nothing.✔️
  4. It remounts the filesystem with the new size.

Q45. What would this sed command do?

sed -E 's/[a-Z]{4}/($)/'  textfile.txt
  1. It would substitute the letter with an ampersand (&).
  2. It would replace all letters in the textfile.txt file with ampersand (&).
  3. It would replace the first four letters with an ampersand (&).✔️
  4. It would place parentheses around the first four letters of each line of textfile.txt.

Q46. With GNU tools such as GNU grep, awk, and sed, what is difference between regular expressions (BREs) and extended regular expressions (EREs)?

  1. EREs support occurrence operators.
  2. Only the syntax differs.✔️
  3. EREs support alternation.
  4. EREs can match groups.

Q47. Which kernel module do you need to load to use interface bonding?

  1. bonding.✔️
  2. team.
  3. netbond.
  4. bond.

Q48. What does this command string do?

find / -size -10K -exec ls -l {} ;
  1. It finds all files larger than 10k and long lists them using the ls command.
  2. It finds all files of size 10k using ls -l and hands them off to the find command to display.
  3. It finds all files in the / directory of size 10k and long lists them.
  4. It finds all files in the file system smaller than 10k and long lists them using the ls command.✔️

Q49. To change the priority of multiple swap partitions, which file would you edit?

  1. /proc/swapiness
  2. /etc/fstab✔️
  3. /etc/mounts
  4. /etc/swaps

Q50. What would you type to list all systemd service unit files, whether they are enabled or not?

  1. systemctl list-services.
  2. chkconfig –list-all
  3. systemctl list-unit-files -at service✔️
  4. systemctl list-unit-files -t service

Q51. You can set Linux group passwords using which command?

  1. gpasswd✔️
  2. passwd
  3. editsam
  4. grouppass

Q52. With most GNU commands, if an option is a word, what will it be preceded by?

  1. two dashes✔️
  2. a backslash
  3. one dash
  4. nothing

Q53. What would happen if you have a script file named script that takes a long time to complete, and you type nohup ./script & in the command line?

  1. The script will remain running in the background even if you reboot the system.
  2. The script will run in your terminal and you will not be able to do anything until it completes.
  3. The script will run in the background until you end the session.✔️
  4. The script will run in the background and will continue running even if you end the session.

Q54. To elevate privileges using the sudo command, a user must _.

  1. enter the root user’s password
  2. enter their own password✔️
  3. enter the sudo user’s password
  4. change to the root group

Reference: From docs: A Cloud Guru’s Blog

Q55. When would this system cron job run its task?

0 22 * * 1-5

  1. on the 22nd of every month from June to May
  2. at 10:00 PM Monday to Friday✔️
  3. every 22 minutes every day except weekends
  4. from 1:00 AM to 5:00 AM on the 22nd of every month

Q56. How does TCP Wrappers differ from a firewall?

  1. Firewalls are only service specific, whereas TCP Wrappers can block all traffic.
  2. TCP Wrappers works at the network layer, so it blocks traffic before the firewall even sees it.
  3. Firewalls easily spawn commands to operate on connection data, whereas TCP Wrappers cannot.
  4. TCP Wrappers works at the application layer, so it can make access decisions on encrypted data.✔️

Q57. As root, you set execute permissions for user, group, and other on a directory. Now users can do what?

  1. They can execute files in it.
  2. They can traverse it.✔️
  3. They can read files in it.
  4. They can delete files in it.

Note: This is correct because of the keyword “directory”. More info at:

Q58. What will this command print?

echo "Thu Jun 4 15:45:45 PDT 2020" | cut -f3 -d" "

  1. It will print nothing.
  2. Thu Jun 4 15:45:45 PDT 2020
  3. 0.6567708333333333
  4. 4✔️

Q59. How can you improve this code snippet?

if ls /etc/passwd &> /dev/null
    echo "exists"
  1. The code snippet cannot be improved, this is a valid way of checking for the existence of a file.
  2. Use Bash’s built-in [[ ]] test conditions instead of the ls command.
  3. The redirect to /dev/null will silence the return code invalidating the conditional. Removing the redirect will solve this.✔️
  4. The ls command will output the name of the file to the screen. Running ls in quiet mode will improve the code snippet.

Note: Not confident about answer. If someone knows the exact answer please contribute in this repository and mark correct answer.

Q60. Using a systemd-based distribution, you want to restrict the cron service from running either automatically or manually. Which command would you run?

  1. systemctl disable crond
  2. systemctl disallow crond
  3. systemctl mask crond
  4. systemctl stop crond✔️

Q61. What issue might a user have when they mount a filesystem by partition path such as /dev/sdal in the /etc/fstab file?

  1. The device order may change on boot, resulting in a system that will not boot properly.
  2. The user may run out of device letters.
  3. There are no issues with referring to partitions by their partition path.
  4. It is more difficult identifying mounted devices by partition path.

Q62. Which option would you choose to force grep to use a basic regular expression (BRE)?

  1. grep -E✔️
  2. grep -B
  3. grep -e
  4. grep -G


Q63. Which choice is a Network Manager tool used to configure network connections from the GUI?

  1. nmcli
  2. ip
  3. Onmtui
  4. nm-connection-editor✔️

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top