This document contains a 40 question multiple choice quiz about Linux administration. The questions cover topics such as commands like dmesg, ls, kill, su, chmod, du; files like /etc/passwd, /etc/shadow, wtmp, utmp; concepts like run levels, initrd, sticky bit; and tasks like changing file permissions, creating links between files, and creating background processes.
This document contains a 40 question multiple choice quiz about Linux administration. The questions cover topics such as commands like dmesg, ls, kill, su, chmod, du; files like /etc/passwd, /etc/shadow, wtmp, utmp; concepts like run levels, initrd, sticky bit; and tasks like changing file permissions, creating links between files, and creating background processes.
1. The dmesg command a) Shows user login logoff attempts b) Shows the syslog file for info messages c) kernel log messages d) Shows the daemon log messages
2. The signal sent to a process when the Ctrl-C key is pressed is a) KILL b) TSTP c) TERM d) INT
3. User id 0 is a) An innvalid user id b) The id of the root user c) The id of a user when the users account is deleted d) None of the above
4. Which command is used to record a user login session in a file a) macro b) read c) script d) none of the above
5. Which command is used to display the operating system name a) os b) Unix c) kernel d) uname
6. By default, a Linux user falls under which group? a) staff b) others c) same as userid (UPG) d) system
7. Which command is used to print a file a) print b) ptr c) lpr d) none of the above
Page 2 of 6
8. Using which command you find resource limits to the session? a) rlimit b) ulimit c) setrlimit d) getrlimit
9. Which option of ls command used to view file inode number a) l b) -o c) a d) i
10. find / -name * will a) List all files and directories recursively starting from / b) List a file named * in / c) List all files in / directory d) List all files and directories in / directory
11. You forget the root password. You decide to reboot using a boot disk. What do you need to do to recover the root password? a) Mount the main partition, edit the /etc/passwd file to remove the root password, reboot. b) Mount the root partition, edit the /etc/passwd file to remove the root password, reboot. c) Mount the main partition, edit the /tmp/passwd file to remove the root password, reboot d) Mount the root partition, edit the /etc/passwds file to remove the root password, reboot e) none of the above
12. The previous system administrator put useless messages at login, what file do you edit to change the system message? a) /etc/motd b) /etc/str c) /etc/strtms d) /etc/.conf
13. Which file does Linux use to resolve hostnames? a) /etc/hostname.conf b) /etc/dns.conf c) /etc/hosts.conf d) /etc/resolve.conf
14. What is bash? a) A kernel system call b) A command to delete multiple files c) A network bit format d) A command shell Page 3 of 6
15. You attempt to remove a directory, but Linux won't allow you, what is the most likely problem? a) The directory name contains illegal characters b) You are not logged in as root c) The hard disk is full d) The directory is not empty e) None are likely problems
16. From a command prompt, what does the command "ls" do? a) Lists the settings of the OS b) Lists the contents of the directory c) List command to list contents of files d) Finnish words, means to direct a file to a port e) None of the Above
17. Which command creates a file system? a) fdisk b) crfs c) mkfs d) fs
18. The login shell is a) The shell program that runs when the user logs in b) The shell program that authenticates the user while logging in c) Common shell for all the users that belong to the same group d) None of the above
19. What does the command "ps" do? a) Prints the directory b) Shows what processes are running c) Print status of LPT1 d) Produces system statistics e) None of the above
20. You are working in Linux when a program hits a flaw and stops running. Which command can be used to end the process? a) kill b) stop c) end d) wait e) CTL-ALT-DEL
Page 4 of 6
21. A user is logged into the Linux workstation, what is the best way to login to root from a shell prompt? a) login root b) chuser root c) su - d) root -
22. The encrypted password of a user is stored in a) /etc/shadow b) /etc/enpasswwd c) /etc/.passwd d) /etc/passwd
23. Which command is used to bring the background process to forground? a) bg b) fg c) background d) forground
24. The command chmod 4777 a.out a) will set the suid bit of a.out b) will set the suid bit of a.out only if the command is issued by root c) is not a valid command d) will set the sticky bit of a.out
25. wtmp and utmp files contain: a) Temporary system data b) User login-logout log c) The users command execution log d) The users su and sudo attempts
26. Applications communicate with kernel by using: a) System Calls b) C Programs c) Shell Script d) Shell
27. Which of the following is considered as the super daemon in Unix? a) sysinit b) init c) inetd d) proc
Page 5 of 6
28. Unix is which kind of Operating System? a) Multi User b) Multi Processes c) Multi Tasking d) All the above
29. Which command changes a files group owner a) cgrp b) chgrp c) change d) group
30. Which command is used to display disk consumption of a specific directory a) du b) ds c) dd d) dds
31. Which command is used to perform backup in unix? a) backup b) cpio c) zip d) gzip
32. Which option of rm command is used to remove a directory with all its subdirectories a) B b) O c) P d) R
33. Which of these commands could you use to show one page of output at a time? a) less b) sed c) pause d) grep
34. Which of the following commands can be used to change default permissions for files and directories at the time of creation a) chmod b) chown c) umask d) chgrp
Page 6 of 6
35. Which of the following is not a valid run-level a) S b) 0 c) 8 d) 1
36. On Linux, initrd is a file a) containing root file-system required during bootup b) Contains only scripts to be executed during bootup c) Contains root-file system and drivers required to be preloaded during bootup d) None of the above
37. Which is loaded into memory when system is booted? a) Kernel b) Shell c) Commands d) Script
38. A user creates a link to a file file1 using the following command ln file1 file2. Which of the following is not true? a) file1 and file2 have the same inode numbers b) The number of links for file1 is displayed as 1 c) The number of links for file1 is displayed as 2 d) The number of links for file2 is displayed as 2
39. Sticky bit can be set using following permission a) 0777 b) 2666 c) 4744 d) 1711
40. nohup is used to a) automatically hang up the process after logout b) continue the process after logout c) create backgroung process d) manually hang up the process after logout