1.
One of the jobs of the kernel is to:
Correct Answer
A. Manage the system's recources
Explanation
The kernel is responsible for managing the system's resources, such as memory, CPU, and input/output devices. It allocates and deallocates resources to different processes, ensuring efficient utilization and preventing conflicts. This includes managing memory allocation, scheduling processes, handling interrupts, and controlling device drivers. Therefore, managing the system's resources is one of the primary tasks of the kernel.
2.
Unix is:
(Choose two)
Correct Answer(s)
A. An operating system
C. A trademark
Explanation
Unix is an operating system that was developed in the 1960s and is still widely used today. It is known for its stability, security, and scalability. Additionally, Unix is also a trademark, indicating that it is a specific implementation of the operating system. However, Unix is not a type of hardware, a distribution of Linux, or a text editor.
3.
Linux is written in:
Correct Answer
A. C
Explanation
Linux is written in C because C is a low-level programming language that provides direct access to memory and hardware, making it suitable for developing an operating system like Linux. C is known for its efficiency, speed, and ability to handle system-level tasks. Additionally, C has a large community and extensive libraries that support Linux development.
4.
Source code refers to:
Correct Answer
D. A human readable version of computer software
Explanation
Source code refers to a human readable version of computer software. It is the original version of a program that is written in a programming language and can be understood by programmers. It is not the version that the computer runs on the CPU, the license that dictates how you may use and share the software, or the interface that software uses to talk to the kernel.
5.
What is the standard option to provide a command line program to view its documentation?
Correct Answer
C. -help
Explanation
The standard option to provide a command line program to view its documentation is "-help". This option is commonly used in command line interfaces to display a brief summary of the available commands and their usage. By using the "-help" option, users can quickly access the documentation and get information on how to use the program effectively.
6.
The command man -k is the same as the command apropos.
True or false?
Correct Answer
A. True
Explanation
The statement is true because both the "man -k" command and the "apropos" command serve the same purpose, which is to search for commands or keywords in the system's manual pages. They provide a list of relevant manual pages that contain the searched keyword or command, allowing users to find the appropriate documentation for their needs.
7.
The whatis command is the same as man -w.
Correct Answer
A. True
Explanation
The statement is true because the "whatis" command in a Unix-like operating system is used to display a brief description of a command or function. Similarly, the "man -w" command is used to display the location of the manual page for a command or function. Both commands serve a similar purpose of providing information about commands or functions in a Unix-like operating system.
8.
The directory where additional documentation for software packages most likely can be found is:
Correct Answer
C. /usr/share/doc
Explanation
The correct answer is /usr/share/doc. This directory is commonly used to store additional documentation for software packages in many Linux distributions. It is a standard location where users can find documentation files, such as manuals, guides, and README files, related to installed software packages.
9.
Hidden files are files that begin with what character?
Correct Answer
C. A period (.)
Explanation
Hidden files are files that begin with a period (.) in their file name. This is a common convention in many operating systems, such as Unix and Unix-like systems, to indicate that a file is hidden and should not be displayed in normal file listings. The use of a period as the first character in a file name is a way to hide files from casual users and prevent accidental modification or deletion.
10.
What option for the ls command will display all files, including hidden files?
Correct Answer
D. -a
Explanation
The option "-a" for the ls command is used to display all files, including hidden files. Hidden files in Unix-like operating systems are files that start with a dot (.) and are typically not shown in directory listings. By using the "-a" option, all files, including these hidden files, will be displayed in the output of the ls command.
11.
The top-level directory on a Linux system is represented as:
Correct Answer
A. /
Explanation
The top-level directory on a Linux system is represented as "/". This is because the forward slash (/) is used as the root directory in Linux. The root directory is the starting point for the file system hierarchy and contains all other directories and files in the system. The other options mentioned (/root, /home, C:) are not the top-level directory, but rather specific directories within the file system.
12.
Is the following path absolute or relative?
/etc/ppp
Correct Answer
B. Absolute
Explanation
The given path "/etc/ppp" is an absolute path because it starts with a forward slash ("/") which indicates the root directory. Absolute paths provide the complete and exact location of a file or directory in the file system, regardless of the current working directory.
13.
Is the following path absolute or relative?
Sysadmin/Documents
Correct Answer
A. Relative
Explanation
The given path "Sysadmin/Documents" is a relative path. A relative path is a path that is relative to the current working directory or another given starting point. In this case, the path is relative to the current working directory, which means that it specifies the location of the "Documents" folder within the "Sysadmin" directory, relative to the current location of the user or program.
14.
Compressing on a file works by:
Correct Answer
C. Removing redundant information
Explanation
Compressing a file involves removing redundant information. Redundant information refers to data that is repetitive or unnecessary for the file's intended purpose. By eliminating this redundant information, the file size is reduced, making it easier to store, transmit, or process. This process can be achieved through various compression algorithms that identify and remove patterns, repetitions, or unused data within the file, resulting in a more efficient representation of the original data.
15.
In general, for which of the following would you want to use lossless compression?
Correct Answer
C. A log file
Explanation
Lossless compression is preferred for a log file because it ensures that no data is lost during the compression process. Log files contain important information that needs to be preserved accurately, such as system events, errors, and user activities. By using lossless compression, the log file can be reduced in size without sacrificing any details or compromising the integrity of the data. This is crucial for analyzing and troubleshooting purposes, where every piece of information in the log file is valuable.
16.
Lossy compression:
(choose three)
Correct Answer(s)
C. Sacrifices some quality
D. Usually results better compression than lossless
E. Is often used with images
Explanation
Lossy compression is a technique that sacrifices some quality in order to achieve better compression than lossless methods. It is often used with images because the human eye is less sensitive to certain types of quality loss in visual data. However, it is not typically used with documents, as it may result in the loss of important information. When decompressed, the file may not be identical to the original, as some data has been permanently discarded during the compression process.
17.
You type gzip myfile.tar. What happens?
(choose two)
Correct Answer(s)
A. Myfile.tar.gz holds a compressed version of myfile.tar
E. Myfile.tar is removed
18.
Error messages generated by commands are sent where by default?
Correct Answer
C. STDERR
Explanation
When error messages are generated by commands, they are sent to the STDERR stream by default. STDERR is a standard stream used for error output, separate from the STDOUT stream which is used for regular output. This separation allows for easier identification and handling of errors. Log files are used to store logs and not specifically for error messages. STDIN is used for input, not output.
19.
A successful command will print output to STDOUT
True or False?
Correct Answer
A. True
Explanation
A successful command will print output to STDOUT. This means that when a command is executed successfully, it will display the desired output on the standard output stream. Therefore, the statement "A successful command will print output to STDOUT" is true.
20.
Which of the following commands will direct error messages to the file, error.log?
(choose one)
Correct Answer
C. Ls /root 2> error.log
Explanation
The correct answer is "ls /root 2> error.log". This command uses the "2>" operator to redirect error messages to the file "error.log". The "2" represents the file descriptor for standard error, and the ">" symbol indicates that the output should be redirected to a file. Therefore, any error messages generated by the "ls /root" command will be saved in the "error.log" file.
21.
A pipe allows you to...
Correct Answer
B. Send the output of one command to another
Explanation
A pipe allows you to redirect the output of one command and use it as the input for another command. This is useful when you want to perform a series of operations on the output of a command without saving it to a file first. By using a pipe, you can streamline your workflow and avoid unnecessary intermediate steps.
22.
Channel 2 is:
Correct Answer
A. STDERR
Explanation
Channel 2 refers to STDERR, which stands for Standard Error. STDERR is a standard output stream that is used to display error messages and diagnostics from a program. It is separate from STDOUT (Standard Output), which is used for normal program output. By redirecting STDERR, error messages can be separated from regular output, allowing for better error handling and debugging.
23.
The echo command:
Correct Answer
D. Is used to ouput text to the console
Explanation
The echo command is used to output text to the console. It allows the user to display messages or variables on the screen during the execution of a script or command. This can be useful for providing feedback or displaying information to the user.
24.
A file begins with #!/bin/csh. This means:
Correct Answer
B. Running the script will invoke /bin/csh to interpret the rest of the file
Explanation
The correct answer is "Running the script will invoke /bin/csh to interpret the rest of the file." This is because the #!/bin/csh at the beginning of the file is known as a shebang or hashbang, and it specifies the interpreter that should be used to execute the script. In this case, it indicates that the script should be run using the C Shell (/bin/csh).
25.
Which are appropriate editors for writing shell script?
(choose two)
Correct Answer(s)
A. Nano
D. Vi
Explanation
The appropriate editors for writing shell script are nano and vi. Nano is a simple and user-friendly text editor that is commonly used for editing files in the terminal. Vi, on the other hand, is a powerful and versatile text editor that is widely used by experienced users. Both editors provide the necessary features and functionality for writing and editing shell scripts effectively. LibrOffice Writer, Firefox, and /bin/bash are not appropriate editors for writing shell scripts as they are not specifically designed for this purpose.
26.
Most of nano's commands take the form of:
Correct Answer
E. Control and another character
Explanation
The correct answer is "Control and another character" because in nano, most commands are executed by pressing the Control key along with another character on the keyboard. This combination allows users to perform various actions such as saving the file, copying and pasting text, searching for specific words, and many more. By using the Control key in combination with another character, users can navigate and manipulate the text efficiently within the nano text editor.
27.
What does this shell cript do?
FOO=/tmp/foo
if [ ! –d $FOO ]; then
mkdir $FOO
fi
Correct Answer
C. Creates /tmp/foo if it does not exists
Explanation
The given shell script checks if the directory "/tmp/foo" does not exist. If it does not exist, the script creates the directory. Therefore, the correct answer is "Creates /tmp/foo if it does not exist".
28.
Which of the following are valid CPU types for intel-based platforms?
(choose two)
Correct Answer(s)
C. 64 bit
D. 32 bit
Explanation
The valid CPU types for Intel-based platforms are 64 bit and 32 bit. These refer to the number of bits that the processor can handle at a time. A 64-bit processor can handle larger amounts of data and perform more complex calculations compared to a 32-bit processor. Intel-based platforms support both of these CPU types, allowing for a wide range of applications and software compatibility.
29.
64 bit platforms can acess more memory than 32 bit platforms
Correct Answer
A. True
Explanation
This statement is true because 64-bit platforms have a larger address space compared to 32-bit platforms. In a 32-bit platform, the memory address is limited to 32 bits, allowing access to a maximum of 4GB of memory. On the other hand, a 64-bit platform has a 64-bit memory address, which allows for a much larger address space, theoretically up to 18.4 million TB of memory. Therefore, 64-bit platforms can indeed access more memory than 32-bit platforms.
30.
What does the acronym RPM mean?
Correct Answer
C. RPM Package Mangement
Explanation
RPM stands for RPM Package Management. RPM is a package management system used in many Linux distributions. It is responsible for managing the installation, upgrading, and removal of software packages on a system. RPM Package Management allows users to easily install, update, and remove software packages using the RPM command-line tool or graphical package managers.
31.
One way to install new software on a Linux system is to use a package management system
Correct Answer
A. True
Explanation
On a Linux system, one way to install new software is by using a package management system. This system allows users to easily search for, download, and install software packages from official repositories. It ensures that the software is compatible with the Linux distribution and handles dependencies automatically. This method is convenient and efficient as it simplifies the installation process and helps in managing software updates and removals.
32.
When you execute the dmesg command, the system displays messages that are generated by the kernel.
Correct Answer
A. True
Explanation
The explanation for the given correct answer is that when the dmesg command is executed, it displays messages that are generated by the kernel. This means that the system will show any kernel-related messages or logs when the dmesg command is run. Therefore, the statement "True" is the correct answer as it accurately reflects the functionality of the dmesg command.
33.
Which of the following are package management commands for distributions with software distributed in files ending in .deb?
(Choose three)
Correct Answer(s)
B. Apt-get
C. Dpkg
D. Aptitude
Explanation
The correct answer is apt-get, dpkg, and aptitude. These three commands are package management commands specifically used for distributions with software distributed in files ending in .deb. rpm is not a package management command for .deb files, it is used for distributions with software distributed in files ending in .rpm.
34.
Which of the following are package management commands for distributions with software distributed in files ending in .rpm?
Correct Answer(s)
A. Yum
C. Rpm
D. Yumex
Explanation
The correct answer is yum, rpm, and yumex. Yum is a package management command for RPM-based distributions. It is used to install, update, and remove software packages. RPM is another package management command specifically for RPM-based distributions. It is used to install, query, verify, update, and remove software packages. Yumex is a graphical user interface for yum, providing a more user-friendly way to manage packages.
35.
Which of the following would be considered a host?
Correct Answer
A. A printer attached to the network via an IP address
Explanation
A printer attached to the network via an IP address would be considered a host because it is a device connected to the network that can send and receive data. It has its own unique IP address, allowing it to communicate with other devices on the network.
36.
A service is...
Correct Answer
C. A feature provided by one computer to another
Explanation
A service is a feature provided by one computer to another. This means that one computer offers a specific functionality or capability that can be accessed and utilized by another computer. It is not a file containing configuration information, another name for a computer's hostname, or like an IP address.
37.
A network packet contains...
(choose two)
Correct Answer(s)
A. The IP address of the destination machine
D. The IP address of the source machine
Explanation
A network packet contains the IP address of the destination machine and the IP address of the source machine. These two pieces of information are crucial for the packet to be properly routed and delivered to the intended recipient. The IP address of the destination machine helps the network infrastructure determine where the packet needs to be sent, while the IP address of the source machine allows the recipient to send a response back to the correct sender.
38.
Only servers have hostnames.
Correct Answer
B. False
Explanation
The statement "Only servers have hostnames" is incorrect. Hostnames are used to identify any device connected to a network, not just servers. Devices such as computers, laptops, smartphones, printers, and even IoT devices can have hostnames assigned to them. Therefore, the correct answer is False.
39.
Which files contain user account information?
(choose two)
Correct Answer(s)
A. /etc/passwd
B. /etc/shadow
Explanation
The correct answer is /etc/passwd and /etc/shadow. The /etc/passwd file contains basic user account information such as username, user ID, home directory, and login shell. The /etc/shadow file, on the other hand, stores the encrypted passwords for user accounts. These two files are commonly used in Unix-based systems to manage user accounts and authentication. The /etc/group file, mentioned as an option in the question, contains information about system groups and their members, but it does not specifically contain user account information.
40.
Which user can view the /etc/shadow file?
Correct Answer
A. The root user
Explanation
The root user is the correct answer because the /etc/shadow file is a sensitive file that contains encrypted password hashes for user accounts. Only the root user, who has administrative privileges, can access and view this file. Other users, including members of the password group, do not have the necessary permissions to view the /etc/shadow file.
41.
Which command will display the UID, GID and grouops you current user belongs to?
Correct Answer
A. Id
Explanation
The command "id" is used to display the UID (User ID), GID (Group ID), and the groups that the current user belongs to. This command provides information about the user's identity and group memberships.
42.
Each user belongs to at least one group.
True or False?
Correct Answer
A. True
Explanation
This statement is true because it states that each user belongs to at least one group. This means that there are no users who do not belong to any group.
43.
Which command will display the users that are currently logged in to the system?
Correct Answer
A. Who
Explanation
The "who" command is used to display the users that are currently logged in to the system. It provides information such as the username, terminal, login time, and remote host. This command is helpful for system administrators to monitor user activity and manage resources effectively.
44.
UIDs 1-500 are usually reserved for what kind of users?
Correct Answer
B. System accounts, such as server processes
Explanation
UIDs 1-500 are typically reserved for system accounts, such as server processes. These accounts are used by the operating system to execute various tasks and manage system resources. They are not associated with log-in users or remote log-in accounts, which have different UID ranges. Group accounts also have their own separate range of UIDs and are not included in the 1-500 range.
45.
If a user is deleted, the files and directories that the user owned....
Correct Answer
C. Will show a UID as the owner, but not user name.
Explanation
When a user is deleted, the files and directories that the user owned will still exist. However, the ownership of these files and directories will be changed to a unique identifier (UID), which is a numeric value used to represent the user. The user name associated with the UID will no longer be displayed, but the UID itself will be shown as the owner of the files and directories.
46.
Which of the following options for the useradd command allows root to specify the UID to be associated with the account?
Correct Answer
B. -u
Explanation
The option "-u" for the useradd command allows root to specify the UID (User ID) to be associated with the account. This option is used to assign a specific numerical value to identify the user. By using this option, root can have control over the UID assigned to the account, ensuring it meets any specific requirements or preferences.
47.
Which of the following options for the useradd command allows root to specify supplementary groups the user will be a member of?
Correct Answer
D. -G
Explanation
The option "-G" for the useradd command allows root to specify supplementary groups that the user will be a member of. This option is used to add the user to additional groups apart from the default group. By using this option, root can assign the user to multiple groups, granting them access and permissions associated with those groups.
48.
On a system that does not use UPG, the useradd command will also create a user group. For example, user bob, group bob.
True or false?
Correct Answer
B. False
Explanation
On a system that does not use UPG, the useradd command will not create a user group. The useradd command is used to create a new user account, but it does not automatically create a corresponding user group. To create a user group, a separate command like groupadd needs to be used.
49.
Which of the following commands set "other" permissions on file to r-x?
Correct Answer
D. Chmod o=rx file
Explanation
The correct answer is "chmod o=rx file". This command sets the "other" permissions on the file to r-x. The "o" represents the "other" user category, "=" sets the permissions to the specified value, and "rx" means read and execute permissions are granted. Therefore, this command sets the "other" permissions to read and execute, while removing any other permissions.
50.
Which of the following commands sets "other" permissions on file to r-x?
Correct Answer
C. Chmod 775 file
Explanation
The correct answer is "chmod 775 file". In Linux, the chmod command is used to change the permissions of a file or directory. The first digit represents the owner's permissions, the second digit represents the group's permissions, and the third digit represents the permissions for others. The number "7" represents read, write, and execute permissions, while the number "5" represents read and execute permissions. Therefore, "chmod 775 file" sets the owner and group permissions to read, write, and execute, and the other permissions to read and execute.