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 change settings on an Apache server. SSH provides a secure and encrypted connection between the client and server, ensuring that the communication is protected from eavesdropping and unauthorized access. Unlike rsh, rlogin, telnet, and login, SSH uses strong encryption and authentication methods, making it the recommended choice for remote login and management of servers.
2.
Which of the following runlevels will reboot the system?
Correct Answer
D. 6
Explanation
Runlevel 6 is the correct answer because it is the runlevel that is used to reboot the system. In Linux, runlevels are different operating modes that determine which services and processes are running. Runlevel 6 specifically indicates a system reboot, causing all processes to be stopped and the system to be restarted. Runlevels 0, 1, 2, and 4 are used for shutdown, single-user mode, multi-user mode without networking, and multi-user mode with networking respectively, but only runlevel 6 is responsible for rebooting the system.
3.
What command, followed by the directory name is used to access that specific directory?
Correct Answer
B. Cd
Explanation
The correct answer is "cd". The "cd" command, followed by the directory name, is used to access that specific directory. "cd" stands for "change directory" and is a command used in command line interfaces to navigate through the file system and move into different directories.
4.
What command is used to clear up the command prompt window?
Correct Answer
D. Clear
Explanation
The correct answer is "clear". The "clear" command is used to clear the command prompt window, removing all previous commands and output from the screen. This command is commonly used in command line interfaces to provide a clean and empty window for new commands to be entered.
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". This command is used in Unix-based systems to list the files and directories that are inside the current directory. It provides a concise and easy way to view the contents of the current directory without any additional parameters or options.
6.
What command shows the directory you are in?
Correct Answer
C. Pwd
Explanation
The command "pwd" stands for "print working directory" and is used to display the current directory that the user is in. This command is commonly used in command line interfaces to quickly determine the location within the file system. By typing "pwd" and pressing enter, the user will see the full path of their current directory displayed on the screen.
7.
___________ 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.
8.
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 "chmod" command is used to change the permissions of a file or directory. The number "700" represents the permission settings for the file. In this case, the first digit "7" represents the permissions for the owner, which is root in this scenario. The number "7" in binary is 111, which means the owner has read, write, and execute permissions. The next two digits "00" represent the permissions for the group and other users, which are denied all permissions. Therefore, using the command "chmod 700 fifteen" will give root all permissions and deny all other users.
9.
__________ command used to create an empty file.
Correct Answer
B. Touch
Explanation
The touch command is used to create an empty file.
10.
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. In this case, it can be used to create a bootable floppy disk that will allow the PC to boot off the Linux install CD. Fdisk can be used to create and manage partitions on a disk, and in this scenario, it is used to create a bootable floppy disk to initiate the installation process.
11.
__________ command is used to show the logger or user.
Correct Answer
B. Who
Explanation
The "who" command is used to display the logger or user.
12.
Which is the command used to remove or delete file with out confirmation msg?
Correct Answer
A. Rm-f
Explanation
The command rm -f is used in Linux and Unix-like operating systems to remove or delete files without asking for confirmation. The -f option stands for "force," which instructs the command to ignore nonexistent files and arguments and never prompt the user. This makes it particularly useful for scripting and automated tasks where user interaction is undesirable. The other options listed, such as del, remove, and delete, are not standard commands for deleting files in Unix-like systems.
13.
"cat" is the command used to _________
Correct Answer
D. See the contents of file
Explanation
The "cat" command is used to display the contents of a file in the terminal. It is commonly used to view the contents of text files or to concatenate multiple files together and display the combined output.
14.
The cat command can perform the same function as which I/O redirection symbol?
Correct Answer
E. >>
Explanation
The cat command can perform the same function as the I/O redirection symbol ">>". The ">>" symbol is used to append the output of a command or a file to an existing file, or create a new file if it doesn't exist. Similarly, the cat command can be used to concatenate and display the contents of one or more files. By using the ">>" symbol with the cat command, the output can be appended to a file instead of being displayed on the screen.
15.
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. Source code refers to the human-readable instructions that make up a program, and it needs to be compiled or translated into machine code before it can be executed. Therefore, the source code file contains the original code that can be modified or compiled to create an executable file. The other file extensions listed (.exe, .tgz, .bff, .bin) are commonly associated with compiled or compressed executable files, not the source code itself.
16.
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
A. Set permissions to 777 on the script
Explanation
Setting permissions to 777 on the script means giving read, write, and execute permissions to all users. While this would allow the normal user to run the script, it is not the most secure option. It is generally recommended to limit permissions to only those necessary for the user to execute the script. Giving full permissions to everyone increases the risk of unauthorized access or modification of the script.
17.
Which of the following modes of operation exist in vi?
Correct Answer
A. Insert
Explanation
The correct answer is "insert" because in vi, the insert mode allows the user to insert text at the current cursor position. This mode is used when the user wants to add or edit text within the file.
18.
Configuration settings for the first Ethernet interface are stored in which file?
Correct Answer
D. Ifcfg-eth0
Explanation
The configuration settings for the first Ethernet interface are stored in the "ifcfg-eth0" file.
19.
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 correct answer is chgrp. The chgrp command is used to change the group owner of a file. The chown command is used to change both the user and group owner of a file. The chmod command is used to change the permissions of a file. The chattr command is used to change the file attributes, not the group owner. The attrch command is not a valid command.
20.
Which command to use for complete details of a command on the shell?
Correct Answer
C. Man
Explanation
The correct answer is "man". The "man" command is used to display the manual pages for a specific command in 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, users can access comprehensive information about that command, making it a useful tool for learning and understanding various shell commands.