Post-Installation Setup in Linux Quiz : 2
Question 1:
Which file contains user account information on a Linux system?
A) /etc/passwd
B) /etc/shadow
C) /etc/group
D) /etc/hosts
Answer: A) /etc/passwd
Question 2:
What is the purpose of the chown
command in Linux?
A) To change the owner of a file or directory
B) To change file permissions
C) To change the group of a file or directory
D) To move a file
Answer: A) To change the owner of a file or directory
Question 3:
Which of the following commands is used to update the system in a Red Hat-based Linux distribution?
A) yum update
B) apt-get update
C) pacman -Syu
D) zypper refresh
Answer: A) yum update
Question 4:
What does the apt-get autoremove
command do?
A) Installs missing dependencies
B) Removes unused packages
C) Upgrades the system
D) Cleans up the package cache
Answer: B) Removes unused packages
Question 5:
Which command is used to create a new group in Linux?
A) groupadd
B) usermod -G
C) useradd
D) addgroup
Answer: A) groupadd
Question 6:
Which command can be used to list all installed packages on a Fedora system?
A) dpkg -l
B) yum list installed
C) pacman -Q
D) rpm -qa
Answer: B) yum list installed
Question 7:
What is the purpose of the sudoers
file in Linux?
A) To manage user passwords
B) To define which users have access to sudo privileges
C) To list system services
D) To configure network settings
Answer: B) To define which users have access to sudo privileges
Question 8:
Which command in Linux is used to add a user to the sudo group?
A) usermod -aG sudo
B) groupadd sudo
C) adduser sudo
D) sudoadd user
Answer: A) usermod -aG sudo
Question 9:
Which command in Linux displays information about the current user?
A) whoami
B) who
C) id
D) logname
Answer: A) whoami
Question 10:
What is the command to display the disk usage of a directory in Linux?
A) ls
B) du
C) df
D) mount
Answer: B) du
0 Comments