Preparing a Functional System in Linux
1.
What command is used to update
the package list on a Debian-based system?
A) yum update
B) apt-get update
C) pacman -Syu
D) dnf upgrade
Correct Answer: B) apt-get update
2.
Which command is used to install
a package on a Red Hat-based system?
A) apt install
B) pacman -S
C) dnf install
D) zypper install
Correct Answer: C) dnf install
3.
What is the purpose of the /etc/fstab file in a Linux system?
A) To manage user accounts
B) To configure network settings
C) To define how disk partitions
and devices are mounted
D) To store system logs
Correct Answer: C) To define how disk partitions and devices are mounted
4.
Which command is used to check
the current disk usage of a filesystem?
A) df -h
B) du -sh
C) ls -l
D) free -m
Correct Answer: A) df -h
5.
What is the default shell for
most Linux distributions?
A) zsh
B) fish
C) bash
D) sh
Correct Answer: C) bash
6.
Which command is used to change
the ownership of a file in Linux?
A) chmod
B) chown
C) chgrp
D) mv
Correct Answer: B) chown
7.
What is the purpose of the sudo command in Linux?
A) To switch users
B) To execute commands with
superuser privileges
C) To create a new user
D) To install software
Correct Answer: B) To execute commands with superuser privileges
8.
Which file contains user account
information in a Linux system?
A) /etc/passwd
B) /etc/shadow
C) /etc/group
D) /etc/sudoers
Correct Answer: A) /etc/passwd
9.
What command would you use to
view the contents of a text file in the terminal?
A) cat
B) view
C) open
D) edit
Correct Answer: A) cat
10.
Which of the following commands
is used to start a service in a systemd-based Linux distribution?
A) service start [service_name]
B) systemctl start [service_name]
C) init start [service_name]
D) run start [service_name]
Correct Answer: B) systemctl start [service_name]
11.
What is the purpose of the chmod command in Linux?
A) To change file ownership
B) To change file permissions
C) To move files
D) To copy files
Correct Answer: B) To change file permissions
12.
Which command is used to display
the current running processes in Linux?
A) ls
B) ps
C) top
D) htop
Correct Answer: B) ps (though top and htop are also valid for real-time monitoring)
13.
What is the purpose of the ping command in Linux?
A) To check disk space
B) To test network connectivity
C) To display system information
D) To manage user accounts
Correct Answer: B) To test network connectivity
14.
Which command is used to search
for a specific string in files?
A) find
B) grep
C) locate
D) search
Correct Answer: B) grep
15.
What is the default location for
user home directories in a Linux system?
A) /usr/home
B) /home
C) /var/home
D) /etc/home
Correct Answer: B) /home
Post a Comment
If you have any doubts, please let me know