On This Page

This set of Linux Multiple Choice Questions & Answers (MCQs) focuses on Linux Set 2

Q1 | Which of the following is not a communication command?
  • grep
  • mail
  • mesg
  • write
Q2 | What command is used with vi editor to replace text from cursor to right
  • S
  • s
  • R
  • r
Q3 | What command is used with vi editor to move back to the beginning of a word?
  • w
  • e
  • a
  • b
Q4 | What command is used with vi editor to search a pattern in the forward direction?
  • ??
  • //
  • ?
  • /
Q5 | What command is used with vi editor to append text at end of line?
  • I
  • i
  • a
  • A
Q6 | Which of the following is not a filter command?
  • sort
  • wc
  • grep
  • cat
Q7 | While executing a command, the shell
  • Executes it in the same process (as shell)
  • Creates a child shell to execute it
  • Loads a special program to take care of the execution
  • None of the mentioned
Q8 | Which variable contains current shell process id
  • $*
  • $?
  • $$
  • $!
Q9 | Hidden files are
  • Those whose ‘read’ bit is set to ‘h’
  • Permitted for (can be accessed) only superusers
  • Files that begin with a ‘.’
  • Files that cannot be opened by ordinary user for writing
Q10 | Shell is ?
  • Command Interpreter
  • Interface between Kernel and Hardware
  • Interface between user and applications
  • Command Compiler
Q11 | Which command searches the string in file opened in vi editor?
  • / or ?
  • f or F
  • t or T
  • none of the mentioned
Q12 | Which command sets the number for all lines?
  • :set li
  • :set ln
  • :set nu
  • :set nl
Q13 | Which of the following is true?
  • Shell is a process and can be started by superuser only
  • Shell is a built-in Kernel functionality
  • Shell is a wrapper for all the commands and utilities
  • None of the mentioned
Q14 | The permission -rwxr–r– represented in octal expression will be
  • 777
  • 666
  • 744
  • 711
Q15 | Effective group id can be set using following permission
  • 777
  • 2666
  • 4744
  • 1711
Q16 | The permission -rwSr–r– represented in octal expression will be
  • 777
  • 2666
  • 4744
  • 4644
Q17 | Which command is used to assign read-write permission to the owner?
  • chmod a+r file
  • chmod o+r file
  • chmod u=rw file
  • chmod og-r file
Q18 | Which of the following umask settings doesn’t allow execute permission to be set by defaulton directory files
  • 222
  • 111
  • 0
  • 444
Q19 | Write the command to display the current date in the form dd/mm/yyyy.
  • date +%d/%m/%Y
  • date +”%d/%m/%Y”
  • date +/%d/%m/20%y
  • date +”/%d/%m/20%y”
Q20 | How to execute ls command inside a vi editor?
  • !ls
  • :ls
  • :!ls
  • we can’t execute
Q21 | What communication command provides communication to another user logged on bywriting to the bottom of their terminal?
  • talk
  • write
  • chat
  • tr
Q22 | Which of the following command output contains userid?
  • ls
  • help
  • date
  • ls –l
Q23 | pwd command displays
  • user password
  • password file content
  • present working directory
  • none of the mentioned
Q24 | What is the default number of files open per user process?
  • 0
  • 1
  • 2
  • 3
Q25 | Solaris is the name of a flavor of UNIX from
  • HP
  • IBM
  • Digital Equipment Corp
  • Sun Microsystems