Pro Coder Quiz

1. What is the terminal command for displaying the contents of a file?
A) ls
B) cat
C) echo
D) man
Correct Answer: Option B
2. A directory contains many files with the same extension. What should you do to find all those files?
A) Use the grep command
B) Use the ls command
C) Use the find command with the -name option
D) Use the cp command
Correct Answer: Option C
3. If you want to change the permissions of a file on Linux, how do you do it?
A) Using the chmod commandCorrect Answer: Option A
4. What is the purpose of the netstat command?
A) Displaying information about network interfacesCorrect Answer: Option C
5. How do you add a new user to the system?
a) adduser
b) useradd
c) newuser
d) createuser
A) Option a) and c)
B) Option b) and c)
C) Option a) and b)
D) Option c) and d)
Correct Answer: Option C
6. How can you check which processes are running on Linux?
a) listprocess
b) ps
c) showprocess
d) top
Correct Answer: Option B
7. Which command is used for secure copy over SSH in Linux?
A) rsync
B) scp
C) ssh-copy-id
D) sftp
Correct Answer: Option B
8. Which command is used to display the IP address configuration of all network interfaces in Linux?
A) ifconfigCorrect Answer: Option D
9. How do you kill a process in Linux?
A) endprocess <PID>Correct Answer: Option B
10. What is the purpose of the sudo command in Linux?
A) Switches to a superuser account
B) Changes the user's password
C) Lists all user accounts
D) Installs new software packages
Correct Answer: Option A
11. How would you monitor disk space usage on a Linux system?
A) top
B) du
C) df
D) free
Correct Answer: Option C
12. What command is used to navigate to the home directory of the current user in the Linux terminal?
A) cd home
B) cd ~
C) home
D) move ~
Correct Answer: Option B13. What is the purpose of the du command in Linux?
A) Display user information
Correct Answer: Option B
14. Which command shows the system load averages and uptime duration in Linux?
A) load
B) uptime
C) sysinfo
D) status
Correct Answer: Option B
15. Which of the following commands is used to install an RPM package on a Red Hat-based Linux system?
A) rpm -i
B) dpkg -i
C) yum install
D) apt-get install
Correct Answer: Option C