questions With Answers

Linux Interview Questions with Answers 2021 | Freshers and Exprienced

Linux Interview Questions with Answers

Learn Linux MCQ questions & answers are available for a Computer Science students to clear GATE exams, various technical interview, Linux / Unix multiple choice questions and answers focuses on various Linux commands and their command line options & parameters. Multiple Choice Questions and Answers. Our 1000+ Linux … Lots of MCQs with Linux Systems Programming code snippet and its output

Q1.The command “mknod myfifo b 4 16”

a) Will create a block device if user is root
b) Will create a block device for all users
c) Will create a FIFO if user is not root
d) None of the mentioned

Option A – Will create a block device if user is root

Q2.Which command is used to record a user login session in a file

a) macro
b) read
c) script
d) none of the mentioned

Option C – script

Q3.Which command is used to display the unix version

a) uname -r
b) uname -n
c) uname -t
d) kernel

Option A – uname -r

Q4.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

Option A – List all files and directories recursively starting from /

Q5.Which command is used to display the octal value of the text

a) octal
b) text_oct
c) oct
d) od

Option D – Od

Q6.Which command changes a file’s group owner

a) cgrp
b) chgrp
c) change
d) group

Option B – chgrp

Q7.Which command is used to extract a column from a text file

a) paste
b) get
c) cut
d) tar

Option C – cut

Q8.Which command is used to perform backup in unix?

a) backup
b) cpio
c) zip
d) gzip

Option B – cpio

Q9.Which option of rm command is used to remove a directory with all its subdirectories

a) –b
b) –o
c) –p
d) –r

Option D – –r

Q10.Which command is used to identify file type?

a) Type
b) File
c) Finfo
d) Info

Option B – File

Q11.Command used to determine the path of an executable file is

a) which
b) where
c) wexec
d) what

Option A – which

Q12.Which of these commands could you use to show one page of output at a time?

a) less
b) sed
c) pause
d) grep

Option A – less

Q13.Which commands will give you information about how much disk space each file in the current directory uses?

a) ls -l
b) ls -la
c) du
d) ls -a

Option C – du

Q14.Which command is used to display all the files including hidden files in your current and its subdirectories ?

a) ssh
b) telnet
c) rsh
d) ftp

Option A – ssh

Q15.pwd command displays

a) user password
b) password file content
c) present working directory
d) none of the mentioned

Option C – present working directory

Q16.Which tar command option is used to list the files in a tape archive format?

a) cvf
b) tvf
c) xvf
d) ovf

Option B – tvf

Q17.Which of the following commands will allow the user to search contents of a file for a particular pattern

a) touch
b) grep
c) find
d) ls

Option B – grep

Q18.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”

Option A – date +%d/%m/%Y

Q19.The command syntax to display the file ‘sample.txt’ one page at a time is

a) man sample.txt>more
b) cat sample.txt<more
c) cat sample.txt|more
d) none of the mentioned

Option C – cat sample.txt|more

Q20.How do you add (append) a file “file1” to the example.tar file

a) no you cannot add a file to example.tar
b) tar -cvf example.tar file1
c) tar -rvf file1 example.tar
d) tar -evf file1 example.tar

Option C – tar -rvf file1 example.tar

Q21.How to execute ls command inside a vi editor?

a) !ls
b) :ls
c) :!ls
d) we can’t execute

Option C – :!ls

Q22.To open a file file1 with cursor at line number 4

a) vi +num file1
b) vi +set num file1
c) vi + “set num” file1
d) vi +/se nu file1

Option A – vi +num file1

Q23.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) transmit

Option A – talk

Q24.Which command will you use to see the available routes?

a) show route
b) route status
c) netstat -r
d) none of the mentioned

Option C – netstat -r

Q25.Which command is used to set limits on file size

a) fsize
b) flimit
c) ulimit
d) usize

Option C – ulimit

Leave a Comment

Your email address will not be published. Required fields are marked *