1.
Linux is:
A. Proprietary software
B. Closed-source operating system
C. Open-source Unix-like operating system
D. Programming language
Answer: C
2. Which editor is commonly available on Unix/Linux?
A. nano
B. vim
C. vi
D. All of the above.
Answer: All of the above.
3. Which command changes the current directory?
A) pwd
B) cd
C) chmod
D) rm
Answer: B) cd
4. Which command creates a new directory?
A) mkdir
B) rmdir
C) touch
D) cat
Answer: A) mkdir
5. Which command removes an empty directory?
A) rm
B) del
C) rmdir
D) erase
Answer: C) rmdir
6. Which command creates an empty file?
A) vi
B) touch
C) nano
D) cp
Answer: B) touch
7. Which command is used to copy files?
A) cp
B) mv
C) rm
D) cat
Answer: A) cp
8. Which command is used to move or rename a file?
A) cp
B) mv
C) rename
D) rm
Answer: B) mv
9. Which command deletes a file?
A) del
B) erase
C) rm
D) rmdir
Answer: C) rm
10. Which command displays the contents of a file?
A) cat
B) pwd
C) chmod
D) grep
Answer: A) cat
11. Which command shows the current logged-in user?
A) id
B) whoami
C) who
D) users
Answer: B) whoami
12. Which command displays the current date and time?
A) cal
B) clock
C) date
D) time
Answer: C) date
13. Which command changes file permissions?
A) chown
B) chmod
C) passwd
D) umask
Answer: B) chmod
14. What does chmod 755 file mean?
A) Read only for everyone
B) Owner has rwx; group and others have rx
C) Everyone has rwx
D) Owner has read only
Answer: B) Owner has rwx; group and others have rx
15. Which command changes the ownership of a file?
A) chmod
B) chgrp
C) chown
D) owner
Answer: C) chown
16. Which command displays running processes?
A) ps
B) jobs
C) top
D) Both A and C
Answer: D) Both A and C
17. Which command terminates a process?
A) kill
B) stop
C) end
D) remove
Answer: A) kill
18. Which command searches for a pattern inside a file?
A) find
B) grep
C) locate
D) search
Answer: B) grep
19. Which command searches for files in the filesystem?
A) grep
B) find
C) search
D) scan
Answer: B) find
20. Which command shows disk usage of files and directories?
A) df
B) du
C) free
D) lsblk
Answer: B) du
21. Which command displays free disk space?
A) du
B) df
C) free
D) mount
Answer: B) df
22. Which command displays memory usage?
A) top
B) free
C) vmstat
D) ps
Answer: B) free
23. Which symbol is used for the root directory?
A) ~
B) /
C) .
D) ..
Answer: B) /
24. Which symbol represents the current user's home directory?
A) /
B) ~
C) ..
D) *
Answer: B) ~
25. Which command displays the manual page of a command?
A) help
B) man
C) info
D) manual
Answer: B) man
26. Which command compresses files using gzip?
A) zip
B) gzip
C) tar
D) compress
Answer: B) gzip
27. Which command is commonly used to archive files?
A) tar
B) zip
C) gzip
D) pack
Answer: A) tar
28. Which file stores user account information?
A) /etc/group
B) /etc/passwd
C) /etc/shadow
D) /etc/profile
Answer: B) /etc/passwd
29. Which file stores encrypted user passwords?
A) /etc/passwd
B) /etc/shadow
C) /etc/users
D) /etc/login
Answer: B) /etc/shadow
30. Which command is used to switch to another user?
A) sudo
B) su
C) login
D) whoami
Answer: B) su
Fill in the blanks:
[Link] command does? → Sort text
[Link] removes? → Duplicate adjacent lines
[Link] extracts? → Fields
[Link] is mainly used for? → Text processing
[Link] is used for? → Stream editing
[Link] compares? → Files
[Link] -s creates? → Symbolic link
[Link] links share? → Same inode
[Link] links are also called? → Soft links
[Link] file stores user accounts? → B. /etc/passwd
Network Questions:
1. Which layer of the OSI model is responsible for routing packets?
A. Data Link Layer
B. Network Layer
C. Transport Layer
D. Session Layer
Answer: B. Network Layer
2. Which protocol is used to automatically assign IP addresses?
A. FTP
B. DNS
C. DHCP
D. ARP
Answer: C. DHCP
3. What is the default port number for HTTPS?
A. 21
B. 25
C. 80
D. 443
Answer: D. 443
4. Which protocol translates domain names into IP addresses?
A. SMTP
B. DNS
C. DHCP
D. ICMP
Answer: B. DNS
5. Which device operates at the Data Link layer?
A. Router
B. Switch
C. Gateway
D. Repeater
Answer: B. Switch
6. What is the primary purpose of NAT?
A. Encrypt data
B. Assign MAC addresses
C. Translate private IP addresses to public IP addresses
D. Improve DNS resolution
Answer: C. Translate private IP addresses to public IP addresses
7. Which protocol is used to test network connectivity?
A. HTTP
B. ICMP
C. FTP
D. SSH
Answer: B. ICMP
8. Which command displays the routing table in Linux?
A. ls
B. netstat -r
C. mkdir
D. chmod
Answer: B. netstat -r
9. Which routing protocol uses the Bellman-Ford algorithm?
A. OSPF
B. RIP
C. BGP
D. IS-IS
Answer: B. RIP
10. Which protocol uses port 22?
A. Telnet
B. SSH
C. SMTP
D. FTP
Answer: B. SSH
11. Which protocol prevents switching loops?
A. RIP
B. STP
C. OSPF
D. ICMP
Answer: B. STP
12. Which protocol resolves IP addresses to MAC addresses?
A. DNS
B. DHCP
C. ARP
D. RARP
Answer: C. ARP
13. Which protocol is used for secure remote login?
A. FTP
B. SSH
C. Telnet
D. SNMP
Answer: B. SSH
14. Which routing protocol is classified as a link-state protocol?
A. RIP
B. EIGRP
C. OSPF
D. BGP
Answer: C. OSPF
15. Which protocol is commonly used for email retrieval?
A. FTP
B. POP3
C. SNMP
D. TFTP
Answer: B. POP3
16. Which IPv4 address class provides the largest number of hosts?
A. Class A
B. Class B
C. Class C
D. Class D
Answer: A. Class A
17. Which TCP flag is used to initiate a connection?
A. ACK
B. FIN
C. SYN
D. PSH
Answer: C. SYN
18. Which protocol is connectionless?
A. TCP
B. UDP
C. FTP
D. SSH
Answer: B. UDP
19. Which command is used to trace the route packets take to a destination in
Linux?
A. ping
B. traceroute
C. ipconfig
D. netstat
Answer: B. traceroute
20. Which device separates broadcast domains?
A. Hub
B. Switch
C. Router
D. Repeater
Answer: C. Router