1.
Which command is used for adding a new user.?
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.
2.
Which command is used to check the content of directory.?
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.
3.
What will happen if we run this command.?#touch file{1..10}
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.
4.
Which is the configuration file of apache server.?
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.
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.
6.
Which command is used for delete all credential of user.?
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".
7.
How to add user1 in to the sysadmin group.?
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.
8.
How to add these user in to the sysadmin group.?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.
9.
How to change the shell for user.?
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.
10.
Which command is used to change the password of user.?
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.
11.
What is the use of chmod command.?
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.
12.
How to formate the swap partition.?
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.
13.
Which is the file consist group information.?
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.
14.
How to Lock the 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.
15.
A user can't remove the data of other user while he have full permission.? just because of
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.
16.
How can you create maximum Primary partition ?
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.
17.
How to see parent Structure of Directory.?
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.
18.
How to append data in to the file.?
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.
19.
MBR stands for .?
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.