Advertise here ✔️

Phone: +255 692 127 931 Email: njoholes@gmail.com

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG5GSwn5UBLXuOOUyUDGcmuQRzn3NFkRk47bJzhk44ktBL7H0hlgUZOHqp4Y7HVlkKJd3MToAGxkygkNoG4t4kxCfjG9pCINqkA3KhHIDeudh4Sv1rRQ9uYAQJLrlxGWYzQWUGD9d8Za8/s930/3.png

Saleh Njohole

Always be inspired in your life.

My Life

What goes around is what comes around.

Brave

Be happy this moment because this moment is your life.

Wednesday, October 1, 2025

MCQS on SYSTEM ADMINISTRATOR


1.    Which language is used to write Ansible playbooks?

a) JSON

b) YAML

c) XML

d) Python

 

Answer: b) YAML

 

2.    What is the alternative command of echo?

a) print

b) printf

c) display

d) write

Answer: b) printf

 

3.    Command to close a terminal session:

a) end

b) exit

c) stop

d) halt

 

Answer: b) exit

 

4.    Which command lists currently running processes in Linux?

a) ls

b) jobs

c) ps

d) proc

 

Answer: c) ps

 

5.    The cd command operates in which mode?

a) Kernel mode

b) User mode

c) Supervisor mode

d) Process mode

Answer: b) User mode

 

6.    Which command shows date in dd/mm/yyyy format?

a) date "+%m/%d/%Y"

b) date "+%Y/%m/%d"

c) date "+%d/%m/%Y"

d) date "+%D"

Answer: c) date "+%d/%m/%Y"

 

7.    Which command is used to download files from the internet in Linux?

a)   curl

b)   wget

c)    ftp

d)   fetch

Answer: b) wget

 

8.    Which command displays system uptime?

a) uptime

b) top

c) who

d) sysstat

Answer: a) uptime

 

9.    Which command shows disk usage in human-readable format?

a) df -h

b) du -k

c) ls -lh

d) disk -u

Answer: a) df -h

 

10. Which Linux command shows last 10 lines of a file?

a) head

b) tail

c) less

d) grep

Answer: b) tail

 

 

 

 

Ansible & Automation

 

11. What is Ansible mainly used for?

a) Containerization

b) Configuration management and automation

c) Network monitoring

d) Log management

Answer: b) Configuration management and automation

 

12. Which command runs an Ansible playbook?

a) ansible

b) ansible-run

c) ansible-playbook

d) run-playbook

Answer: c) ansible-playbook

 

13. YAML files in Ansible must start with:

a) {}

b) []

c) ---

d) ###

Answer: c)

 

14. Ansible connects to remote machines via:*

a) FTP

b) SSH

c) Telnet

d) HTTP

Answer: b) SSH

 

15. Ansible modules are written in:

a) Java

b) Python

c) Bash

d) C++

Answer: b) Python

 

 

 

Databases & SQL

 

16. Full outer join returns:

a) Only matching rows

b) Non-matching rows only

c) All rows from both tables with NULL for missing matches

d) Only left table rows

Answer: c) All rows from both tables with NULL for missing matches

 

17. Join that returns non-matching rows is:

a) Inner join

b) Self join

c) Anti join

d) Cross join

Answer: c) Anti join

 

18. A materialized view is:

a) Temporary view created in memory

b) Virtual table updated in real time

c) A physically stored query result

d) Just a synonym of a table

Answer: c) A physically stored query result

 

19. Which SQL command removes all rows but keeps structure?*

a) DELETE

b) DROP

c) TRUNCATE

d) REMOVE

Answer: c) TRUNCATE

 

20. Which constraint ensures unique values in a column?

a) FOREIGN KEY

b) PRIMARY KEY

c) UNIQUE

d) CHECK

Answer: c) UNIQUE

 

 

 

21. What does YAML stand for?

a) Yet Another Markup Language

b) YAML Ain’t Markup Language

c) Your Actual Markup Language

d) Yield And Mark Language

Answer: b) YAML Ain’t Markup Language

 

22. What is a rainbow attack?

a) SQL injection

b) Brute force using hash chains

c) Malware injection

d) DoS attack

Answer: b) Brute force using hash chains

 

23. What is the function of ssh-keygen?

a) Reset root password

b) Generate SSH key pairs

c) Encrypt files

d) Create digital certificates

Answer: b) Generate SSH key pairs

 

24. Which SSH command copies files to remote hosts?

a) ssh-copy

b) scp

c) cp-ssh

d) ssh-put

Answer: b) scp

 

25. Which command displays routing table in Linux?

a) route -n

b) ifconfig

c) traceroute

d) netstat -r

Answer: a) route -n

 

26. Patch management involves:

a) Installing software patches

b) Monitoring logs

c) Adding new users

d) Firewall configuration

Answer: a) Installing software patches

 

27. Which protocol does HTTPS use for encryption?

a) TLS/SSL

b) SSH

c) IPsec

d) AES

Answer: a) TLS/SSL

 

28. Which tool is used for packet capturing?

a) ping

b) traceroute

c) tcpdump

d) whois

Answer: c) tcpdump

 

29. Malware encryption is mainly used for

a) Securing user files

b) Evading detection

c) Increasing execution speed

d) Network communication

Answer: b) Evading detection

 

29. Which Linux command shows listening network ports?

a) netstat -tuln

b) route -n

c) ifconfig

d) ip link show

Answer: a) netstat -tuln

 

30. last -F command shows:

a) Failed login attempts

b) Full login & logout times

c) Current users

d) Last run processes

Answer: b) Full login & logout times

 

 

31. Which file stores Linux user account info?

a) /etc/group

b) /etc/passwd

c) /etc/shadow

d) /etc/login

Answer: b) /etc/passwd

 

32. Which file stores encrypted user passwords?

a) /etc/login

b) /etc/shadow

c) /etc/group

d) /etc/passwd

Answer: b) /etc/shadow

 

33. Which Linux command is used to change permissions?

a) chmod

b) chown

c) ls -l

d) umask

Answer: a) chmod

 

34. Which Linux command is used to check memory usage?

a) free -h

b) df -h

c) ps aux

d) top

Answer: a) free -h

 

35. Which Linux command shows system logs?

a) dmesg

b) syslog

c) journalctl

d) logview

Answer: c) journalctl

 

36. Which runlevel represents multi-user mode without GUI in Linux?

a) 3

b) 5

c) 0

d) 1

Answer: a) 3

 

37. Which Linux command is used to schedule tasks once?

a) cron

b) at

c) systemctl

d) job

Answer: b) at

 

38. Which Linux command continuously monitors processes?

a) ps

b) jobs

c) top

d) kill

Answer: c) top

 

39. Which Linux command kills a process by PID?

a) kill -9

b) exit -f

c) stop -p

d) terminate -pid

Answer: a) kill -9

 

40. Which one is NOT a Linux OS?

a) Ubuntu

b) Fedora

c) Debian

d) Solaris

Answer: d) Solaris

 

41. Which Linux distribution is known for servers?

a) Ubuntu Server

b) CentOS/RHEL

c) Fedora Workstation

d) Kali Linux

Answer: b) CentOS/RHEL

 

 

42. Which Linux distribution is popular for penetration testing?

a) Ubuntu

b) Debian

c) Kali Linux

d) Fedora

Answer: c) Kali Linux

 

43. Which Linux distribution is community-driven and based on Debian?

a)   Ubuntu

b)   Arch

c)    Fedora

d)   OpenSUSE

Answer: a) Ubuntu

 

44. Which package manager does Ubuntu use?

a) yum

b) apt

c) dnf

d) pacman

Answer: b) apt

 

45. Which package manager does CentOS/RHEL use?

a)   apt

b)   pacman

c)    yum/dnf

d)   zypper

Answer: c) yum/dnf

 

46. Which file system is default in most modern Linux distros?*

a)   FAT32

b)   NTFS

c)    ext4

d)   HFS+

Answer: c) ext4

 

47. Which Linux command extracts .tar.gz file?

a)   unzip file.tar.gz

b)   tar -xvzf file.tar.gz

c)    gunzip file.tar.gz

d)   untar file.tar.gz

Answer: b) tar -xvzf file.tar.gz

 

48. Which Linux command finds files by name?

a)   locate filename

b)   where filename

c)    find / -name filename

d)   search filename

Answer: c) find / -name filename

 

49. Which Linux command compresses a file using gzip?

a)   compress

b)   zip

c)    gzip file

d)   gz file

Answer: c) gzip file


 __________________________________________________________________

FOR ANY ENQUIRIES

👇

WhatsApp: +255 692 127 931


___________________________________________________________________________________

                                                                ***ALL THE BEST*** 

Share:

Contact Us

SALEHE NJOHOLE P.O.BOX 2428, DAR ES SALAAM, TANZANIA EAST AFRICA. Call: 0692 127 931