UNIX and Linux Essentials Quiz Questions and Answers

Answer :
  • lspci

Explanation :

The lspci command displays information on PCI devices. Since many motherboard features appear to Linux as PCI devices, option D provides a great deal of information on your motherboard, and so it is correct. Option A’s lscpu command provides information on the CPU, which means that it provides little direct information on the motherboard, so option A is incorrect. The Xorg program is the Linux X server, and option B creates a new X configuration fi le. This fi le might provide hints about video hardware on the motherboard, but option D provides better and more information, so option B is incorrect. The fdisk utility can partition a disk, and the command in option C displays information on how /dev/sda is partitioned. This information has nothing to do with the motherboard’s features, though, so option C is incorrect
Answer :
  • NFS

Explanation :

The Network File System (NFS) was designed for exactly the task described in the question, so option B is correct. The Simple Mail Transfer Protocol (SMTP) enables one computer to send email messages to another computer, so it’s a poor choice for achieving the stated goal and option A is incorrect. The PHP: Hypertext Processor (PHP) language is used to generate dynamic content for web pages, so option C is incorrect. The Domain Name System (DNS) is a protocol for delivering the mappings between hostnames and IP addresses to computers, so it won’t easily achieve the stated goals, making option D incorrect
Answer :
  • wonderjaye is a directory
  • All users of the system may read wonderjaye

Explanation :

The d character that leads the mode indicates that the fi le is a directory, while the r symbol in the r-x triplet at the end of the symbolic mode indicates that all users of the system have read access to the directory, so options C and D are both correct. Leading l characters, which this mode lacks, denotes symbolic links, so option A is incorrect. Although the x symbols usually denote executable program files, as specifi ed in option B, in the case of directories, this permission bit indicates that the directory’s contents may be searched; executing a directory is meaningless.
Answer :
  • The route between your computer and its DNS server may be incorrect.
  • Your computer’s DNS configuration may be broken.

Explanation :

DNS problems can manifest as an ability to connect to computers using IP addresses but not using hostnames. Thus options A and D (and various other DNS-related problems) could create the symptoms described. If the target system were configured to ignore ping packets, as described in option B, it wouldn’t respond when you identifi ed it by IP address. The target system’s DNS configuration (option C) doesn’t enter into the equation, because it responds to the ping request via IP address alone.
Answer :
  • sudo cat /etc/shadow

Explanation :

The sudo command is the usual way to execute a single command as root , and option A gives the correct syntax to use it as the question specifi es. There is no standard root command, so option B is incorrect. The passwd command changes passwords, so option C is incorrect. Although you can use su to execute a single command as root , you must use it with the -c option to do this, as in su -c "cat /etc/ shadow" , so option D is incorrect.
Answer :
  • It’s the system administration account.

Explanation :

UID 0 is reserved for the system administrator’s account, also known as root , so option A is correct. The fi rst ordinary user account is not a system account, and its UID is normally 500 or 1000, depending on the distribution, so option B is incorrect. Because A is correct, C cannot be correct. The association of UID 0 for administrative tasks is basic in Linux, so you won’t fi nd variation on this score, making option D incorrect.
Answer :
  • init

Explanation :

Typically, Linux starts init as the fi rst process, so option A is correct. bash is a Linux text-mode shell program. Although it’s important for user interaction, it’s far from the fi rst process Linux starts. The cron daemon manages timed execution of programs to handle routine maintenance tasks. It’s started automatically in the boot process, but it’s not the fi rst process the kernel starts, so option C is incorrect. A
Answer :
  • The IP address assigned to eth0
  • The hardware address of eth0

Explanation :

When used to display information on an interface, ifconfig shows the hardware (option C) and IP (option B) addresses of the interface, the protocols (such as TCP/IP) bound to the interface, and statistics on transmitted and received packets. This command does not return information about programs using the interface (option A), the hostname associated with the interface (option D).
Answer :
  • A LibreOffice word processing document

Explanation :

LibreOffi ce, like most word processors, uses a binary format that can’t be properly parsed using an ASCII or Unicode text editor. Thus nano won’t be useful in examining such a document, making option D correct. The nano text editor can handle ASCII or Unicode format, so the text fi les described in options A and C are incorrect
Answer :
  • tar tvf data79.tar

Explanation :

With the tar utility, the --list (t) command is used to read the archive and display its contents. The -- verbose (v) option creates a verbose fi le listing, and --file (f) specifi es the fi lename— data79.tar in this case. Option D uses all of these features, and therefore does as the question specifi es.