On This Page

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

Q1 | Maximum how long can a Linux filename be?
  • 128 bytes
  • 255 bytes
  • 32 bytes
  • 64 bytes
Q2 | Which combination of keys is used to exit from terminal?
  • Ctrl + t
  • Ctrl + z
  • Ctrl + d
  • Ctrl + e
Q3 | Which command(s) is/are used to get help about a command in Linux?
  • info
  • man
  • None of these
  • Both a and b
Q4 | Which command is used to get the kernel version in Linux?
  • uname -r
  • kernel
  • uname -n
  • uname –s
Q5 | Which command is used to list all the files in your current directory(including hidden)?
  • ls -l
  • ls -t
  • ls -a
  • ls –i
Q6 | Which command is/are used to remove directory in Linux?
  • rmdir
  • rm -r
  • only b
  • Both a and b
Q7 | Which of the following command is used to create file in Linux?
  • touch
  • cat
  • echo
  • All of the above
Q8 | In Linux everything stored as a
  • file
  • directory
  • executables
  • None of the above
Q9 | Which of the following command can be used as an alternative to echo command?
  • print
  • printr
  • printf
  • none of these
Q10 | Which command is used see the list of users who are currently logged-in?
  • login
  • users
  • who
  • which
Q11 | Which directory in Linux contains all the config file of the system?
  • /etc
  • /var
  • /lib
  • /bin
Q12 | Which of the following command is used to count number of lines in a file?
  • wc -l
  • wc -c
  • wc -w
  • None of these
Q13 | Which command is used to copy entire directory?
  • cp -r
  • cp -i
  • cp
  • none of these
Q14 | Which special character should be avoided during naming a file?
  • .(dot)
  • $
  • _(underscore)
  • #NAME?
Q15 | Suppose I am in /etc directoy, after executing cd .(single dot), where am I now?
  • /etc
  • /(root)
  • /home
  • None of these
Q16 | mv command can be used to ?
  • Move the file to different directory.
  • Renaming a file
  • Both a and b.
  • Only a.
Q17 | Which command is used to print the login shell of an user?
  • echo $SHELL
  • echo $LOGIN
  • echo $LSHELL
  • None of the Above
Q18 | which command is used to print the current working direcotry?
  • pwd
  • echo $PWD
  • Both A and B
  • Only A
Q19 | Which command is used to set terminal IO characteristic?
  • tty
  • ctty
  • ptty
  • sty
Q20 | Which option of ls command used to view file inode number
  • –l
  • #NAME?
  • –a
  • –i
Q21 | Which directory contains all the files needed to boot the Linux system?
  • /dev
  • /boot
  • /bin
  • none
Q22 | What is the right command to save file and exit in Vim?
  • :wq
  • :a
  • :q
  • :q!
Q23 | Which of the following is not an editor?
  • expr
  • vi
  • emacs
  • ex
Q24 | In a date +format, you add the hour in 24 hours format using:
  • %f
  • %H
  • %F
  • %h
Q25 | What command is used with vi editor to delete a single character?
  • x
  • y
  • a
  • None of the above