Commands And Permissions In Linux: Quiz!

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 Roobina_naaz
R
Roobina_naaz
Community Contributor
Quizzes Created: 2 | Total Attempts: 4,537
Questions: 21 | Attempts: 1,539

SettingsSettingsSettings
Commands And Permissions In Linux: Quiz! - Quiz

.


Questions and Answers
  • 1. 

    What is the symbolic representation of this numeric permission: 644?

    • A.

      Rwxr-xr-x

    • B.

      Rw-r--r--

    • C.

      Rw-------

    • D.

      R--rw-rw-

    Correct Answer
    B. Rw-r--r--
    Explanation
    The symbolic representation of the numeric permission 644 is "rw-r--r--". In this representation, the first character "rw-" indicates that the owner of the file has read and write permissions, the next three characters "r--" indicate that the group members have only read permissions, and the last three characters "r--" indicate that others (users not in the owner's group) also have only read permissions.

    Rate this question:

  • 2. 

    Given a file with permission 755, what commands would change the permission to r-xr--r--?

    • A.

      Chmod 544 filename

    • B.

      Chmod u+w,go+x filename

    • C.

      Chmod u-rx,go-r filename

    • D.

      Chgrp 544 filename

    Correct Answer
    A. Chmod 544 filename
    Explanation
    The correct answer is "chmod 544 filename". This command changes the permission of the file to r-xr--r--, where the owner has read, write, and execute permissions, and the group and others have only read permissions. The "chmod" command is used to change the permissions of a file, and the numbers 544 represent the octal representation of the desired permissions. The first digit (5) represents the owner's permissions, the second digit (4) represents the group's permissions, and the third digit (4) represents the permissions for others.

    Rate this question:

  • 3. 

    In linux, how many types of way we have?

    • A.

      4

    • B.

      3

    • C.

      2

    • D.

      1

    Correct Answer
    C. 2
    Explanation
    The correct answer is 2 because in Linux, there are two main types of ways: command line interface (CLI) and graphical user interface (GUI). CLI allows users to interact with the system through text commands, while GUI provides a visual interface with icons and menus. These two ways offer different levels of control and convenience, catering to the preferences and needs of different users.

    Rate this question:

  • 4. 

    In which directory the booting file is save?

    • A.

      Dev

    • B.

      Home

    • C.

      Var

    • D.

      Boot

    Correct Answer
    D. Boot
    Explanation
    The booting file is saved in the "boot" directory. This directory contains essential files for the system's boot process, including the bootloader and kernel.

    Rate this question:

  • 5. 

    The user specific document save in the /usr directory?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    Typically, user-specific documents are not saved in the /usr directory. The /usr directory in Unix-like operating systems contains user-independent files, such as system binaries, libraries, and documentation. User-specific documents are often saved in directories within the user's home directory or other locations specific to the user.

    Rate this question:

  • 6. 

    What command should we use to show the all hidden directory contents?

    • A.

      Ls -i

    • B.

      Ls -a

    • C.

      Ls -s

    • D.

      Ls /a

    Correct Answer
    B. Ls -a
    Explanation
    To show all hidden directory contents, we should use the command "ls -a". The "-a" option in the "ls" command stands for "all" and it displays all files and directories, including the hidden ones. This allows us to see the contents of directories that are normally not visible.

    Rate this question:

  • 7. 

    To list the directory contents with permissions the command is...........

    • A.

      Ls -Z

    • B.

      Ls -z

    • C.

      Ls -/Z

    • D.

      Ls -/z

    Correct Answer
    A. Ls -Z
    Explanation
    The command "ls -Z" is used to list the directory contents with permissions. The "-Z" option displays the SELinux security context of each file or directory. This can be useful for checking the permissions and access control settings of the listed files. The other options listed (-z, -/Z, -/z) are not valid options for the "ls" command.

    Rate this question:

  • 8. 

    To shut down the machine which command should we use?

    • A.

      Shut down

    • B.

      Shutdown -h now

    • C.

      Power off

    • D.

      Poweroff

    Correct Answer(s)
    B. Shutdown -h now
    D. Poweroff
    Explanation
    The correct answer is "shutdown -h now" and "poweroff". Both of these commands are used to shut down a machine. "shutdown -h now" is a command that initiates an immediate shutdown of the system and halts all processes. "poweroff" is another command that can be used to power off the machine. Both commands achieve the same result of shutting down the machine.

    Rate this question:

  • 9. 

    To check the history we used _____________ command.

    Correct Answer(s)
    history
    Explanation
    The correct answer is "history" because the command "history" is used to check the command history in a terminal or command prompt. It displays a list of previously executed commands, along with their corresponding line numbers. This allows users to quickly access and rerun previous commands without having to retype them.

    Rate this question:

  • 10. 

    All the logs and variables install in which directory?

    • A.

      /etc

    • B.

      /usr

    • C.

      /var

    • D.

      /log

    Correct Answer
    C. /var
  • 11. 

    What is LINUX SHELL?

    • A.

      Linux shell is a user interface used for executing the commands.

    • B.

      Linux shell is a free shell for UNIX.

    • C.

      Linux shell the default working directory.

    • D.

      Linux shell is a administrator interface used for executing the commands.

    Correct Answer
    A. Linux shell is a user interface used for executing the commands.
    Explanation
    The Linux shell is a user interface that allows users to interact with the operating system by executing commands. It provides a command-line interface where users can input commands and receive output from the system. The Linux shell is responsible for interpreting and executing these commands, allowing users to perform various tasks and manage the system efficiently.

    Rate this question:

  • 12. 

    Bob Armstrong, who has a username of boba, calls to tell you he forgot his password. What command should you use to reset his command?

    • A.

      Password boba

    • B.

      Password -boba

    • C.

      Passwd /boba

    • D.

      Passwd boba

    Correct Answer
    D. Passwd boba
    Explanation
    To reset Bob Armstrong's password, the correct command to use is "passwd boba". The "passwd" command is used to change a user's password, and by specifying "boba" after the command, it indicates that the password being changed is for the user with the username "boba".

    Rate this question:

  • 13. 

    What command is used to remove the password assigned to a group?

    • A.

      Passwd -rm

    • B.

      Passwd -r group

    • C.

      Gpasswd -r

    • D.

      Grouppasswd -rm

    Correct Answer
    C. Gpasswd -r
    Explanation
    C - The gpasswd command is used to change the password assigned to a group. Use the -r option to remove the password from the group.

    Rate this question:

  • 14. 

    You are covering for another system administrator and one of the users asks you to restore a file for him. You locate the correct tarfile by checking the backup log but do not know how the directory structure was stored. What command can you use to determine this?

    • A.

      Tar fx tarfile dirname

    • B.

      Tar ctf tarfile

    • C.

      Tar tvf tarfile filename

    • D.

      Tar tvf tarfile

    Correct Answer
    D. Tar tvf tarfile
    Explanation
    D - The only way to enlarge a partition is to delete it and recreate it. You will then have to restore the necessary files from backup.

    Rate this question:

  • 15. 

    What type of server is used to remotely assign IP addresses to machines during the installation process?

    • A.

      SMB

    • B.

      NFS

    • C.

      DHCP

    • D.

      HTTP

    • E.

      FT

    Correct Answer
    C. DHCP
    Explanation
    C - You can use a DHCP server to assign IP addresses to individual machines during the installation process. Answers a, b, d, and e-list legitimate Linux servers, but these servers do not provide IP addresses. The SMB, or Samba, tool is used for file and print sharing across multi-OS networks. An NFS server is for file sharing across Linux net-works. FTP is a file storage server that allows people to browse and retrieve information by logging in to it, and HTTP is for the Web.

    Rate this question:

  • 16. 

    Which password package should you install to ensure that the central password file couldn't be stolen easily?

    • A.

      PAM

    • B.

      Tcp_wrappers

    • C.

      Securepass

    • D.

      Shadow

    • E.

      Ssh

    Correct Answer
    D. Shadow
    Explanation
    D - The shadow password package moves the central password file to a more secure location. Answers a, b, and e all point to valid packages, but none of these places the password file in a more secure location. Answer d points to an invalid package.

    Rate this question:

  • 17. 

    When using useradd to create a new user account, which of the following tasks is not done automatically.

    • A.

      Assign a UID.

    • B.

      Assign a default shell.

    • C.

      Create the user's home directory.

    • D.

      Define the user's home directory.

    Correct Answer
    C. Create the user's home directory.
    Explanation
    C - The useradd command will use the system default for the user's home directory. The home directory is not created, however, unless you use the -m option.

    Rate this question:

  • 18. 

    You attempt to use shadow passwords but are unsuccessful. What characteristic of the /etc/passwd file may cause this?

    • A.

      The login command is missing.

    • B.

      The username is too long.

    • C.

      The password field is prefaced by an asterisk.

    • D.

      The password field is blank.

    Correct Answer
    D. The password field is blank.
    Explanation
    D - The password field must not be blank before converting to shadow passwords.

    Rate this question:

  • 19. 

    There are seven fields in the /etc/passwd file. Which of the following lists all the fields in the correct order?

    • A.

      Username, UID, GID, home directory, command, comment

    • B.

      Username, UID, GID, comment, home directory, command

    • C.

      UID, username, GID, home directory, comment, command

    • D.

      Username, UID, group name, GID, home directory, comment

    Correct Answer
    B. Username, UID, GID, comment, home directory, command
    Explanation
    B - The seven fields required for each line in the /etc/passwd file are username, UID, GID, comment, home directory, command. Each of these fields must be separated by a colon even if they are empty.

    Rate this question:

  • 20. 

    Which file defines all users on your system?

    • A.

      /etc/passwd

    • B.

      /etc/users

    • C.

      /etc/password

    • D.

      /etc/user.conf

    Correct Answer
    A. /etc/passwd
    Explanation
    A - The /etc/passwd file contains all the information on users who may log into your system. If a user account is not contained in this file, then the user cannot log in.

    Rate this question:

  • 21. 

    Which two commands can you use to delete directories?

    • A.

      Rm

    • B.

      Rm -rf

    • C.

      Rmdir

    • D.

      Rd

    • E.

      Rd -rf

    Correct Answer(s)
    B. Rm -rf
    C. Rmdir
    Explanation
    B, C - You can use rmdir or rm -rf to delete a directory. Answer a is incorrect because the rm command without any specific flags will not delete a directory, it will only delete files. Answers d and e point to a non-existent command.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 01, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 24, 2010
    Quiz Created by
    Roobina_naaz
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.