1.
You need to change some settings on your Apache server. Which is the best tool to use for logging in remotely?
Correct Answer
B. Ssh
Explanation
SSH (Secure Shell) is the best tool to use for logging in remotely to an Apache server. It provides a secure and encrypted connection, ensuring that the data transmitted between the client and the server is protected from unauthorized access. On the other hand, tools like rsh, rlogin, telnet, and login do not provide the same level of security and encryption as SSH, making them less suitable for remote logins.
2.
Which of the following runlevel will reboot the system?
Correct Answer
D. 6
Explanation
Runlevel 6 is the correct answer because it is the runlevel that initiates a system reboot. In Linux, runlevels are specific operating modes that determine which services and processes are running. Runlevel 6 is typically used for system reboot, as it stops all processes and services, unmounts filesystems, and then restarts the system. Runlevels 0, 1, 2, and 4 have different purposes, such as shutdown, single-user mode, multi-user mode, or custom configurations, but they do not initiate a system reboot like runlevel 6 does.
3.
What command, followed by the directory name is used to access that specific directory?
Correct Answer
B. Cd
Explanation
The command "cd" is used to access a specific directory. By typing "cd" followed by the directory name, the user can navigate to that directory and access its contents. This command is commonly used in command line interfaces to move between different directories within a file system.
4.
What command is used to clear up the command prompt window?
Correct Answer
D. Clear
Explanation
The command "clear" is used to clear up the command prompt window.
5.
How would you show a list of files and directories that are inside the current directory?
Correct Answer
B. Ls
Explanation
The correct answer is "ls". The "ls" command is used in Unix-like operating systems to list files and directories in the current directory. It displays the names of all files and directories in a formatted manner, allowing users to easily view the contents of the current directory.
6.
___________ is the command used to create new directory.
Correct Answer
C. Mkdir
Explanation
The correct answer is "mkdir". This command is used to create a new directory in a file system.
7.
You want to change the permissions on the file named “fifteen” so that root has all permissions and they are denied all other users. Which command should you use?
Correct Answer
C. Chmod 700 fifteen
Explanation
The correct answer is "chmod 700 fifteen". The command "chmod" is used to change the permissions of a file. The number "700" represents the permissions for the file, where the first digit (7) represents the permissions for the owner (root), the second digit (0) represents the permissions for the group, and the third digit (0) represents the permissions for other users. In this case, "7" gives the owner (root) read, write, and execute permissions, while "0" denies all permissions to the group and other users. Therefore, using "chmod 700 fifteen" will change the permissions of the file "fifteen" as desired.
8.
__________ command used to create an empty file.
Correct Answer
B. Touch
Explanation
The touch command is used to create an empty file.
9.
Your PC is unable to boot off the Linux install CD. Which utility should be used to create an installation boot floppy?
Correct Answer
A. Fdisk
Explanation
To create an installation boot floppy, the utility that should be used is fdisk. Fdisk is a command-line utility used for partitioning hard drives on Linux systems. In this case, it would be used to create a bootable floppy disk that can be used to boot the PC and initiate the Linux installation process.
10.
__________ command is used to show the logger or user.
Correct Answer
B. Who
Explanation
The "who" command is used to display the users who are currently logged in to the system. It provides information such as the username, terminal, login time, and remote host. By using the "who" command, the system administrator or user can see the list of active users and their activities on the system.
11.
Which is the command used to remove or delete a file without confirmation message?
Correct Answer
A. Rm-f
Explanation
To delete a file in Linux without a confirmation message, use the "rm -f" command. The "rm" command is used to remove files and directories, and the "-f" option, which stands for "force," instructs the command to delete the file without prompting for confirmation. Be careful when using this command to avoid accidentally deleting important files.
12.
"cat" is the command used to _________
Correct Answer
E. Concatenate file
Explanation
The cat command in Unix and Linux systems stands for "concatenate." Its primary function is to read, concatenate, and display the contents of files to the standard output. This means cat can be used to view the contents of a file, as well as to merge several files into one. For example, using cat file1 file2 > mergedfile combines the contents of file1 and file2 into a new file called mergedfile. This versatile command is essential for handling text data within the command line environment.
13.
The cat command can perform the same function as which I/O redirection symbol?
Correct Answer
E. >>
Explanation
">>" is used for appending output to a file. Similarly, the cat command can be used to append text or data from one file to another using a command like cat file1 >> file2, which appends the contents of file1 to file2.
14.
If you are installing a software package from source code, the file will typically have which extension?
Correct Answer
A. .src
Explanation
When installing a software package from source code, the file will typically have the .src extension. This extension indicates that the file contains the source code of the software, which is the original code written by the developers. By compiling this source code, the software can be built and installed on the system. Other extensions like .exe, .tgz, .bff, and .bin are commonly used for executable or compressed files, but when installing from source code, the .src extension is the most appropriate.
15.
You have written a shell script that must be run as root in order to work properly. What is the most secure way to give a normal user the ability to run this program?
Correct Answer
D. Set the SUID bit on the script
Explanation
The most secure way to give a normal user the ability to run a shell script that must be run as root is to set the SUID (Set User ID) bit on the script. This allows the script to be executed with the privileges of the file's owner (in this case, root), even when it is run by a normal user.
16.
Which of the following modes of operation exist in vi?
Correct Answer
A. Insert
Explanation
The correct answer is "insert" because "insert" is a valid mode of operation in the vi text editor. In insert mode, the user can directly type and insert text into the document. This mode allows for editing and adding content to the file.
17.
Which of the following commands can be used to change the group owner of a file?
Correct Answer(s)
B. Chmod
E. Chgrp
Explanation
The command "chgrp" can be used to change the group owner of a file. This command allows the user to modify the group ownership of a file or directory. On the other hand, "chmod" is used to change the permissions of a file or directory, not the group owner.
18.
Which command to use for complete details of a command on the shell?
Correct Answer
C. Man
Explanation
The "man" command is used to display the manual pages for a specific command on the shell. It provides a detailed explanation of the command, including its usage, options, and examples. By using the "man" command followed by the desired command name, users can access comprehensive information about the command and its functionality.