Quiznetik
Linux | Set 1
1. Maximum how long can a Linux filename be?
A. 128 bytes
B. 255 bytes
C. 32 bytes
D. 64 bytes
Correct : B. 255 bytes
2. Which combination of keys is used to exit from terminal?
A. Ctrl + t
B. Ctrl + z
C. Ctrl + d
D. Ctrl + e
Correct : C. Ctrl + d
3. Which command(s) is/are used to get help about a command in Linux?
A. info
B. man
C. None of these
D. Both a and b
Correct : A. info
4. Which command is used to get the kernel version in Linux?
A. uname -r
B. kernel
C. uname -n
D. uname –s
Correct : A. uname -r
5. Which command is used to list all the files in your current directory(including hidden)?
A. ls -l
B. ls -t
C. ls -a
D. ls –i
Correct : C. ls -a
6. Which command is/are used to remove directory in Linux?
A. rmdir
B. rm -r
C. only b
D. Both a and b
Correct : D. Both a and b
7. Which of the following command is used to create file in Linux?
A. touch
B. cat
C. echo
D. All of the above
Correct : D. All of the above
8. In Linux everything stored as a
A. file
B. directory
C. executables
D. None of the above
Correct : A. file
9. Which of the following command can be used as an alternative to echo command?
A. print
B. printr
C. printf
D. none of these
Correct : C. printf
10. Which command is used see the list of users who are currently logged-in?
A. login
B. users
C. who
D. which
Correct : C. who
11. Which directory in Linux contains all the config file of the system?
A. /etc
B. /var
C. /lib
D. /bin
Correct : A. /etc
12. Which of the following command is used to count number of lines in a file?
A. wc -l
B. wc -c
C. wc -w
D. None of these
Correct : A. wc -l
13. Which command is used to copy entire directory?
A. cp -r
B. cp -i
C. cp
D. none of these
Correct : A. cp -r
14. Which special character should be avoided during naming a file?
A. .(dot)
B. $
C. _(underscore)
D. -(Hyphen)
Correct : D. -(Hyphen)
15. Suppose I am in /etc directoy, after executing cd .(single dot), where am I now?
A. /etc
B. /(root)
C. /home
D. None of these
Correct : A. /etc
16. mv command can be used to ?
A. Move the file to different directory.
B. Renaming a file
C. Both a and b.
D. Only a.
Correct : C. Both a and b.
17. Which command is used to print the login shell of an user?
A. echo $SHELL
B. echo $LOGIN
C. echo $LSHELL
D. None of the Above
Correct : A. echo $SHELL
18. which command is used to print the current working direcotry?
A. pwd
B. echo $PWD
C. Both A and B
D. Only A
Correct : C. Both A and B
19. Which command is used to set terminal IO characteristic?
A. tty
B. ctty
C. ptty
D. sty
Correct : D. sty
20. Which option of ls command used to view file inode number
A. –l
B. -o
C. –a
D. –i
Correct : D. –i
21. Which directory contains all the files needed to boot the Linux system?
A. /dev
B. /boot
C. /bin
D. none
Correct : B. /boot
22. What is the right command to save file and exit in Vim?
A. :wq
B. :a
C. :q
D. :q!
Correct : A. :wq
23. Which of the following is not an editor?
A. expr
B. vi
C. emacs
D. ex
Correct : A. expr
24. In a date +format, you add the hour in 24 hours format using:
A. %f
B. %H
C. %F
D. %h
Correct : B. %H
25. What command is used with vi editor to delete a single character?
A. x
B. y
C. a
D. None of the above
Correct : A. x
26. Which of the following is not a communication command?
A. grep
B. mail
C. mesg
D. write
Correct : A. grep
27. What command is used with vi editor to replace text from cursor to right
A. S
B. s
C. R
D. r
Correct : C. R
28. What command is used with vi editor to move back to the beginning of a word?
A. w
B. e
C. a
D. b
Correct : D. b
29. What command is used with vi editor to search a pattern in the forward direction?
A. ??
B. //
C. ?
D. /
Correct : D. /
30. What command is used with vi editor to append text at end of line?
A. I
B. i
C. a
D. A
Correct : D. A
31. Which of the following is not a filter command?
A. sort
B. wc
C. grep
D. cat
Correct : D. cat
32. While executing a command, the shell
A. Executes it in the same process (as shell)
B. Creates a child shell to execute it
C. Loads a special program to take care of the execution
D. None of the mentioned
Correct : B. Creates a child shell to execute it
33. Which variable contains current shell process id
A. $*
B. $?
C. $$
D. $!
Correct : C. $$
34. Hidden files are
A. Those whose ‘read’ bit is set to ‘h’
B. Permitted for (can be accessed) only superusers
C. Files that begin with a ‘.’
D. Files that cannot be opened by ordinary user for writing
Correct : C. Files that begin with a ‘.’
35. Shell is ?
A. Command Interpreter
B. Interface between Kernel and Hardware
C. Interface between user and applications
D. Command Compiler
Correct : A. Command Interpreter
36. Which command searches the string in file opened in vi editor?
A. / or ?
B. f or F
C. t or T
D. none of the mentioned
Correct : A. / or ?
37. Which command sets the number for all lines?
A. :set li
B. :set ln
C. :set nu
D. :set nl
Correct : C. :set nu
38. Which of the following is true?
A. Shell is a process and can be started by superuser only
B. Shell is a built-in Kernel functionality
C. Shell is a wrapper for all the commands and utilities
D. None of the mentioned
Correct : C. Shell is a wrapper for all the commands and utilities
39. The permission -rwxr–r– represented in octal expression will be
A. 777
B. 666
C. 744
D. 711
Correct : C. 744
40. Effective group id can be set using following permission
A. 0777
B. 2666
C. 4744
D. 1711
Correct : B. 2666
41. The permission -rwSr–r– represented in octal expression will be
A. 0777
B. 2666
C. 4744
D. 4644
Correct : D. 4644
42. Which command is used to assign read-write permission to the owner?
A. chmod a+r file
B. chmod o+r file
C. chmod u=rw file
D. chmod og-r file
Correct : C. chmod u=rw file
43. Which of the following umask settings doesn’t allow execute permission to be set by default on directory files
A. 222
B. 111
C. 000
D. 444
Correct : C. 000
44. Write the command to display the current date in the form dd/mm/yyyy.
A. date +%d/%m/%Y
B. date +”%d/%m/%Y”
C. date +/%d/%m/20%y
D. date +”/%d/%m/20%y”
Correct : A. date +%d/%m/%Y
45. How to execute ls command inside a vi editor?
A. !ls
B. :ls
C. :!ls
D. we can’t execute
Correct : C. :!ls
46. What communication command provides communication to another user logged on by writing to the bottom of their terminal?
A. talk
B. write
C. chat
D. tr
Correct : A. talk
47. Which of the following command output contains userid?
A. ls
B. help
C. date
D. ls –l
Correct : D. ls –l
48. pwd command displays
A. user password
B. password file content
C. present working directory
D. none of the mentioned
Correct : C. present working directory
49. What is the default number of files open per user process?
A. 0
B. 1
C. 2
D. 3
Correct : D. 3
50. Solaris is the name of a flavor of UNIX from
A. HP
B. IBM
C. Digital Equipment Corp
D. Sun Microsystems
Correct : D. Sun Microsystems