Linux Interview Questions

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. Which command is used to record a user login session in a file
a) macro
b) read
c) script
d) none of the above

3. Which command is used to display the operating system name
a) os
b) Unix
c) kernel
d) uname

4. Which command is used to display the unix version
a) uname -r
b) uname -n
c) uname -t
d) kernel

5. Which command is used to print a file
a) print
b) ptr
c) lpr
d) none of the above

6. Which option of ls command used to view file inode number
a) –l
b) -o
c) –a
d) –i

7. Which command is used to view compressed text file contents
a) cat
b) type
c) zcat
d print

8. Which command changes a file’s group owner
a) cgrp
b) chgrp
c) change
d) group

9. Which command is used to extract intermediate result in a pipeline
a) tee
b) extract
c) exec
d) none of the above

10. Which option of rm command is used to remove a directory with all its subdirectories
a) –b
b) –o
c) –p
d) –r

11. Which command creates an empty file if file does not exist?
a) cat
b) touch
c) ed
d) read

12. Which command is used to identify file type?
a) Type
b) File
c) Finfo
d) Info

13. Command used to determine the path of an executable file is
a) which
b) where
c) wexec
d) what

14. Command used to count number of character in a file is
a) grep
b) wc
c) count
d) cut

15. Which of these commands could you use to show one page of output at a time?
a) less
b) sed
c) pause
d) grep

1:c – 2:c – 3:d – 4:a – 5:c – 6:d – 7:c – 8:b – 9:a – 10.d – 11:b – 12:b – 13:a – 14:b –

15:a –

Leave a comment