Linux School

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Shimpisagar
S
Shimpisagar
Community Contributor
Quizzes Created: 1 | Total Attempts: 528
Questions: 20 | Attempts: 528

SettingsSettingsSettings
Linux School - Quiz

This is a small test on Linux basics for the beginners.


Questions and Answers
  • 1. 

    You need to change some settings on your Apache server. Which is the best tool to use for logging in remotely?

    • A.

      Rsh

    • B.

      Ssh

    • C.

      Rlogin

    • D.

      Telnet

    • E.

      Login

    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.

    Rate this question:

  • 2. 

    Which of the following runlevels will reboot the system?

    • A.

      0

    • B.

      2

    • C.

      4

    • D.

      6

    • E.

      1

    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.

    Rate this question:

  • 3. 

    What command, followed by the directory name is used to access that specific directory?

    • A.

      Cp

    • B.

      Cd

    • C.

      Access

    • D.

      Acs

    • E.

      Cdr

    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.

    Rate this question:

  • 4. 

    What command is used to clear up the command prompt window?

    • A.

      Clr

    • B.

      Clrscr

    • C.

      Clrwin

    • D.

      Clear

    • E.

      Clearit

    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.

    Rate this question:

  • 5. 

    How would you show a list of files and directories that are inside the current directory?

    • A.

      List

    • B.

      Ls

    • C.

      Dir

    • D.

      Listfiles

    • E.

      Listout

    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.

    Rate this question:

  • 6. 

    What command shows the directory you are in?

    • A.

      Directory

    • B.

      Dir

    • C.

      Pwd

    • D.

      Showdir

    • E.

      Dirpwd

    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.

    Rate this question:

  • 7. 

    ___________ is the command used to create new directory.

    • A.

      Dir

    • B.

      Newdir

    • C.

      Mkdir

    • D.

      Mk/dir

    • E.

      Create dir

    Correct Answer
    C. Mkdir
    Explanation
    The correct answer is "mkdir". This command is used to create a new directory in a file system.

    Rate this question:

  • 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?

    • A.

      Chmod fifteen 700

    • B.

      Chmod 100 fifteen

    • C.

      Chmod 700 fifteen

    • D.

      Chmod fifteen 100

    • E.

      Chmod 770 fifteen

    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.

    Rate this question:

  • 9. 

    __________ command used to create an empty file.

    • A.

      Mtfile

    • B.

      Touch

    • C.

      File

    • D.

      Intouch

    • E.

      Create

    Correct Answer
    B. Touch
    Explanation
    The touch command is used to create an empty file.

    Rate this question:

  • 10. 

    Your PC is unable to boot off the Linux install CD. Which utility should be used to create an installation boot floppy?

    • A.

      Fdisk

    • B.

      Cp

    • C.

      Dd

    • D.

      Tar

    • E.

      Boot

    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.

    Rate this question:

  • 11. 

    __________ command is used to show the logger or user.

    • A.

      ?

    • B.

      Who

    • C.

      ???

    • D.

      No of

    • E.

      Which

    Correct Answer
    B. Who
    Explanation
    The "who" command is used to display the logger or user.

    Rate this question:

  • 12. 

    Which is the commmand used to remove or delete file with out confirmation msg?

    • A.

      Rm-f

    • B.

      Rm

    • C.

      Del

    • D.

      Remove

    • E.

      Delete

    Correct Answer
    B. Rm
    Explanation
    The correct answer is "rm". The "rm" command is used to remove or delete files in Unix-like operating systems. By default, when using the "rm" command, a confirmation message is displayed to confirm the deletion of each file. However, by adding the "-f" option to the command, the confirmation message is bypassed and the file is deleted without any further prompts.

    Rate this question:

  • 13. 

    "cat" is the command used to _________

    • A.

      Change directory

    • B.

      Move directory

    • C.

      Come out of shell

    • D.

      See the contents of file

    • E.

      Concatenate file

    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.

    Rate this question:

  • 14. 

    The cat command can perform the same function as which I/O redirection symbol?

    • A.

      >

    • B.

    • C.

      !

    • D.

    • E.

      >>

    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.

    Rate this question:

  • 15. 

    If you are installing a software package from source code, the file will typically have which extension?

    • A.

      .src

    • B.

      .exe

    • C.

      .tgz

    • D.

      .bff

    • E.

      .bin

    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.

    Rate this question:

  • 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?

    • A.

      Set permissions to 777 on the script

    • B.

      Make the user a member of the root group

    • C.

      Make the user the owner of the script

    • D.

      Set the SUID bit on the script

    • E.

      Change the group of the user to same of the owner

    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.

    Rate this question:

  • 17. 

    Which of the following modes of operation exist in vi?

    • A.

      Insert

    • B.

      Type

    • C.

      Search

    • D.

      Remove

    • E.

      Delete

    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.

    Rate this question:

  • 18. 

    Configuration settings for the first Ethernet interface are stored in which file?

    • A.

      Ifup-en0

    • B.

      Ifup-eth0

    • C.

      Ifconfig-eth0

    • D.

      Ifcfg-eth0

    • E.

      Cfg-eth0

    Correct Answer
    D. Ifcfg-eth0
    Explanation
    The configuration settings for the first Ethernet interface are stored in the "ifcfg-eth0" file.

    Rate this question:

  • 19. 

    Which of the following commands can be used to change the group owner of a file?

    • A.

      Chown

    • B.

      Chmod

    • C.

      Chattr

    • D.

      Attrch

    • E.

      Chgrp

    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.

    Rate this question:

  • 20. 

    Which command to use for complete details of a command on the shell?

    • A.

      Help

    • B.

      ?

    • C.

      Man

    • D.

      Hlp

    • E.

      Info

    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.

    Rate this question:

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.