Redhat Quiz Sa1 & Sa2

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 Roylnigam
R
Roylnigam
Community Contributor
Quizzes Created: 1 | Total Attempts: 1,138
Questions: 20 | Attempts: 1,148

SettingsSettingsSettings
Redhat Quiz Sa1 & Sa2 - Quiz

Hii this RHCSA Test is prepared by Sanjay Nigam (Linux Admin)
for more Details: freely reach to me.
E-mail: sanjay. Nigam0433@gmail. Com
Follow on Instagram: @root_sanjay


Questions and Answers
  • 1. 

    Which command is used for adding a new user.?

    • A.

      Add user

    • B.

      Useradd

    • C.

      Usermod

    • D.

      Userplus

    Correct Answer
    B. Useradd
    Explanation
    The correct answer is "useradd". This command is used to add a new user in a Unix or Linux system. It creates a new user account with the specified username and assigns a unique user ID (UID) to the user. The useradd command also creates a home directory for the user and sets the default shell for the user's login.

    Rate this question:

  • 2. 

    Which command is used to check the content of directory.?

    • A.

      Ls

    • B.

      List

    • C.

      Lsdir

    • D.

      Li

    Correct Answer
    A. Ls
    Explanation
    The correct answer is "ls". The "ls" command is used to list the content of a directory. It displays the names of files and directories within the specified directory. This command is commonly used in Unix-based operating systems to quickly view the contents of a directory.

    Rate this question:

  • 3. 

    What will happen if we run this command.?#touch file{1..10}

    • A.

      It create file with name file{1..10}

    • B.

      It create 10 files

    • C.

      Error

    • D.

      None of these

    Correct Answer
    B. It create 10 files
    Explanation
    Running the command "touch file{1..10}" will create 10 files. The command uses brace expansion to generate a sequence of file names from "file1" to "file10", and the "touch" command is used to create these files. Therefore, executing this command will result in the creation of 10 files with the specified names.

    Rate this question:

  • 4. 

    Which is the configuration file of apache server.?

    • A.

      /etc/httpd/conf/httpd.conf

    • B.

      /etc/httpd.conf

    • C.

      /var/www/apache.conf

    • D.

      None of these

    Correct Answer
    A. /etc/httpd/conf/httpd.conf
    Explanation
    The correct answer is /etc/httpd/conf/httpd.conf. This file is the main configuration file for the Apache server. It contains all the settings and directives that control the behavior of the server. By editing this file, administrators can customize various aspects of the server, such as the port number, virtual hosts, and access control. It is typically located in the /etc/httpd/conf/ directory on Linux systems.

    Rate this question:

  • 5. 

    For permanent mount /etc/ is the file.

    Correct Answer
    fstab
    Explanation
    The given answer, "fstab," is the correct answer because it is the configuration file in Linux systems that contains information about the file systems and devices to be mounted at boot time. The "/etc/" in the question suggests that the file being referred to is located in the "/etc/" directory, which is where the fstab file is typically found. Therefore, the answer "fstab" is the most appropriate choice.

    Rate this question:

  • 6. 

    Which command is used for delete all credential of user.?

    • A.

      Userdel user1

    • B.

      Userdel -r user1

    • C.

      Userdel -all user1

    • D.

      None of these

    Correct Answer
    B. Userdel -r user1
    Explanation
    The correct answer is "userdel -r user1". The "-r" option is used to remove the user's home directory and all its contents along with the user account. This command will delete all credentials and associated files of the user named "user1".

    Rate this question:

  • 7. 

    How to add user1 in to the  sysadmin group.?

    • A.

      Groupadd user1 sysadmin

    • B.

      Gpasswd -a sysadmin user1

    • C.

      Gadd user1 sysadmin

    • D.

      Gpasswd -a user1 sysadmin

    Correct Answer
    D. Gpasswd -a user1 sysadmin
    Explanation
    The correct answer is "gpasswd -a user1 sysadmin". This command is used to add user1 to the sysadmin group. The "-a" option is used to add a user to a group, and "user1" is the username that is being added to the "sysadmin" group.

    Rate this question:

  • 8. 

    How to add these user in to the sysadmin group.?user1 , user2 , user3

    • A.

      Gpasswd -a user1 user2 user3

    • B.

      Gpasswd -m user1 user2 user3

    • C.

      Gpasswd -M user1 user2 user3

    • D.

      Gpasswd -all user1 user2 user3

    Correct Answer
    A. Gpasswd -a user1 user2 user3
    Explanation
    The correct answer is gpasswd -a user1 user2 user3. This command adds user1, user2, and user3 to the sysadmin group.

    Rate this question:

  • 9. 

    How to change the shell for user.?

    • A.

      Usermod -s

    • B.

      User -k

    • C.

      Usermod -S

    • D.

      None of these

    Correct Answer
    A. Usermod -s
    Explanation
    The correct answer is "usermod -s". This command is used to change the login shell for a user. The "-s" option followed by the desired shell path specifies the new shell for the user.

    Rate this question:

  • 10. 

    Which command is used to change the password of user.?

    • A.

      Password

    • B.

      Passwd

    • C.

      Paswd

    • D.

      Pass

    Correct Answer
    B. Passwd
    Explanation
    The correct answer is "passwd". The passwd command is used to change the password of a user in a Unix-like operating system. It allows the user to enter a new password and update their login credentials.

    Rate this question:

  • 11. 

    What is the use of chmod command.?

    • A.

      To set permission

    • B.

      To create link

    • C.

      To check contents of Directory

    • D.

      None of these

    Correct Answer
    A. To set permission
    Explanation
    The chmod command is used to set permissions for files and directories in a Unix-like operating system. It allows the user to specify who can read, write, and execute a file or directory. By using chmod, the user can control access to their files and protect them from unauthorized access or modifications.

    Rate this question:

  • 12. 

    How to formate the swap partition.?

    • A.

      Swapformate

    • B.

      Mkswap

    • C.

      Mkfs

    • D.

      None of these

    Correct Answer
    B. Mkswap
    Explanation
    The correct answer is "mkswap". This command is used to format a swap partition on a Linux system. It creates a swap area on a device or a file, which can then be activated as a swap space using the "swapon" command. The "mkswap" command initializes the swap space with a unique identifier and sets up the necessary data structures for the kernel to use it as swap memory.

    Rate this question:

  • 13. 

    Which is the file consist group information.?

    • A.

      /etc/group

    • B.

      /etc/shadow

    • C.

      /etc/gshadow

    • D.

      /etc/groupinfo

    Correct Answer
    C. /etc/gshadow
    Explanation
    The correct answer is /etc/gshadow. This file contains group information, specifically the encrypted passwords and other security-related information for groups on a Linux system. It is a secure version of the /etc/group file, which only contains basic group information. The gshadow file is typically only accessible by the root user to ensure the security of the group passwords.

    Rate this question:

  • 14. 

    How to Lock the user.?

    • A.

      Usermod -l user

    • B.

      Usermod -L user

    • C.

      Userlo user

    • D.

      Usermod -a user

    Correct Answer
    B. Usermod -L user
    Explanation
    The correct answer is "usermod -L user". This command is used to lock the user account in Linux. When the account is locked, the user will not be able to log in and access the system.

    Rate this question:

  • 15. 

     A user can't remove the data of other user while he have full permission.? just because of

    • A.

      Stickey bit permission

    • B.

      Special permission

    • C.

      Nested condition

    • D.

      None of these

    Correct Answer
    A. Stickey bit permission
    Explanation
    The correct answer is stickey bit permission. The stickey bit permission is a special permission that can be set on a directory in Unix-like operating systems. When the stickey bit permission is set, it prevents users from deleting or renaming files in that directory, unless they are the owner of the file or the directory itself. This ensures that users cannot accidentally or maliciously remove the data of other users, even if they have full permission on the directory.

    Rate this question:

  • 16. 

    How can you create maximum Primary partition ?

    • A.

      6

    • B.

      5

    • C.

      3

    • D.

      4

    Correct Answer
    D. 4
    Explanation
    To create the maximum number of primary partitions, you need to understand the limitations of the partition table. The MBR (Master Boot Record) partitioning scheme allows for a maximum of four primary partitions. Therefore, the correct answer is 4, as it indicates that you can create a maximum of four primary partitions.

    Rate this question:

  • 17. 

    How to see parent Structure of Directory.?

    • A.

      Ls

    • B.

      Ls -r

    • C.

      Ls -R

    • D.

      Ls -p

    Correct Answer
    C. Ls -R
    Explanation
    The correct answer is ls -R. The -R option in the ls command stands for "recursive", which means it will display the parent structure of the directory and all its subdirectories. It will list all the files and directories within the specified directory, as well as any files and directories within its subdirectories, in a hierarchical manner.

    Rate this question:

  • 18. 

    How to append data in to the file.?

    • A.

      Cat>>file

    • B.

      Cat>file

    • C.

      Cat

    • D.

      None of these

    Correct Answer
    A. Cat>>file
    Explanation
    The correct answer is "cat>>file". This is the correct way to append data into a file using the cat command in Unix/Linux systems. The ">>" operator is used to redirect the output of the cat command and append it to the specified file.

    Rate this question:

  • 19. 

    MBR stands for .?

    • A.

      Master Bit Record

    • B.

      Master Boot Record

    • C.

      Map Bit Record

    • D.

      Map Boot Record

    Correct Answer
    B. Master Boot Record
    Explanation
    The correct answer is Master Boot Record. MBR stands for Master Boot Record, which is a small section of a computer's hard drive that contains important information about the drive's partitions and booting process. It is located in the first sector of the hard drive and is responsible for loading the operating system. The MBR contains the partition table, boot loader, and other essential data that allows the computer to start up properly.

    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.