Top Most Linux Environment Interview Questions
Q – 1 How do you get help about the command “cp”?
a) help cp
b) man cp
c) cd ?
d) help cd
Ans- b) man cp
Q – 2 Which among the following is used to write small programs to control Unix functionalities?
a) Shell Commands
b) Shell Script
c) Filters
d) C Language
Ans- b) Shell Script
Q – 3 What are the sizes of (Integer/Long/Pointer) in LP64 programming model?
a) 8/8/8
b) 4/4/8
c) 4/8/8
d) 4/8/4
Ans- c) 4/8/8
Q – 4 Which of these is not a Unix Flavor?
a) BSD
b) MAC
c) AIX
d) IRIX
Ans- b) MAC
Q – 5 If a file with execute permissions set, but with unknown file format is executed:
a) The file is passed to /bin/sh
b) The system returns an error
c) The current shell will try to execute it
d) None of the mentioned
Ans- c) The current shell will try to execute it
Q – 6 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
Ans- c) Shell is a wrapper for all the commands and utilities
Q – 7 Which is true with regards to the shell prompt:
a) It can be accidentally erased with backspace
b) The prompt cannot be modified
c) The prompt can be customized (modified)
d) None of the mentioned
Ans- c) The prompt can be customized (modified)
Q – 8 What is a shell in UNIX?
a) a program through which users can issue commands to UNIX
b) a window management system
c) the login screen
d) the thing that rides on the back of a turtle in UNIX
Ans- a) a program through which users can issue commands to UNIX
Q – 9 Which of the following represents an absolute path?
a) ../home/file.txt
b) bin/cat
c) cs2204/
d) /usr/bin/cat
Ans- d) /usr/bin/cat
Q – 10 The user bhojas logged in and performed the following sequence of command. What will be the output of the last command?
$ cd project/module1
$ pwd
a) /home/bhojas/project/module1
b) /home/project/module1
c) /usr/bhojas/project/module1
d) project/module1
Ans- a) /home/bhojas/project/module1
Q – 11 BASH shell stands for?
a) Bourne-again Shell
b) Basic Access Shell
c) Basic to Advanced Shell
d) Big & Advanced Shell
Ans- a) Bourne-again Shell
Q – 12 Which of the following files will not be displayed by the command cat re*?
a) reminder
b) receipt
c) Receipt
d) recipe-cake
Ans- c) Receipt
Q – 13 Shell is?
a) Command Interpreter
b) Interface between Kernel and Hardware
c) Interface between user and applications
d) Command Compiler
Ans- a) Command Interpreter
Q – 14 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
Ans- c) Files that begin with a ‘.’
Q – 15 For every successful login, which script will be executed?
a) /etc/inittab
b) /etc/profile
c) /etc/login
d) /etc/init
Ans- b) /etc/profile
Q – 16 Which command is used to debug a shell script program:
a) set
b) set -x
c) debug
d) db
Ans- b) set -x
Q – 18 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 above
Ans- b) Creates a child shell to execute it
Q – 19 Which of the following commands allows definition and assignment of environment variables under bash?
a) env
b) export
c) environ
d) setenviron
Ans- a) env
Q – 20 To feed standard output of one command to standard input of another in a single shell session:
a) IO redirection can be used
b) Named pipes can be used
c) The pipe operator provided by the shell can be used
d) It can not be done
Ans- c) The pipe operator provided by the shell can be used
Q – 21 X86-32 uses which programming model?
a) IP16
b) IP32
c) ILP16
d) ILP32
Ans- d) ILP32
Q – 22 Which of the following UNIX flavor is from IBM?
a) BSD
b) Solaris
c) HP-UX
d) AIX
Ans- d) AIX
Q – 23 Which of the following statement is FALSE?
a) Unix supports multiple users
b) Linux is an open source operating system and the source code is shared
c) Shell takes care of inter process communication
d) Shell provides the feature of I/O Redirection
Ans- c) Shell takes care of inter process communication
Q – 24 SVR4 was developed by:
a) Sun Microsystems
b) AT&T
c) University of Berkeley
d) Sun and AT&T jointly
Ans- d) Sun and AT&T jointly
Q – 25 Syntax of any Unix command is:
a) command [options] [arguments]
b) command options [arguments]
c) command [options] [arguments]
d) command options arguments
Ans- a) command [options] [arguments]
Q – 26 Lp0 device file is used to access:
a) Floppy
b) Cdrom
c) Printer
d) Tape drive
Ans- c) Printer
Q – 27 SVR4 stands for?
a) Standard Version Release 4
b) System Version Release 4
c) Standard Five Release 4
d) System Five Release 4
Ans- d) System Five Release 4
Q – 28 Unix is which kind of Operating System?
a) Multi User
b) Multi Processes
c) Multi Tasking
d) All the above
Ans- d) All the above
Q – 29 Which of the following is considered as the super daemon in Unix?
a) sysinit
b) init
c) inetd
d) proc
Ans- b) init
Q – 30 Which of the following enables multi-tasking in UNIX?
a) Time Sharing
b) Multi programming
c) Multi user
d) Modularity
Ans- a) Time Sharing
Q – 31 The system calls in UNIX is written using which language?
a) C
b) C++
c) Assembly Language
d) Fortran
Ans- a) C
Q – 32 Which of the following is “NOT” a UNIX variant?
a) Solaris
b) AIX
c) IRIX
d) AS400
Ans- d) AS400
Q – 33 Solaris is the name of a flavor of UNIX from:
a) HP
b) IBM
c) Digital Equipment Corp
d) Sun Microsystems
Ans- d) Sun Microsystems
Q – 34 Applications communicate with kernel by using:
a) System Calls
b) C Programs
c) Shell Script
d) Shell
Ans- a) System Calls
Q – 35 Which among the following interacts directly with system hardware?
a) Shell
b) Commands
c) Kernel
d) Applications
Ans- c) Kernel
Q – 36 Under UNIX the key board is the default input device and the monitor is the default output device.
a) True
b) False
Ans- a) True
Q – 37 Single Unix Specification Version 2 provides enhanced support for:
a) 16 bit Unix
b) 32 bit Unix
c) 64 bit Unix
d) 8 bit Unix
Ans- c) 64 bit Unix
Q – 38 ILP32 stands for:
a) 32 bit Integer, Long & Pointer
b) 32 bit Integrated Long & Pointer
c) 32 bit Intelligent Long & Pointer
d) 32 bit Long & Pointer
Ans- a) 32 bit Integer, Long & Pointer
Q – 39 Which is the core of the operating system?
a) Shell
b) Kernel
c) Commands
d) Script
Ans- b) Kernel
Q – 40 Wtmp and utmp files contain:
a) Temporary system data
b) User login-logout log
c) The user’s command execution log
d) The user’s su and sudo attempts
Ans- b) User login-logout log
Q – 41 At start of process execution, STDOUT & STDERR:
a) Point to current terminal device
b) Are closed
c) Point to special files on the system
d) None of the above
Ans- a) Point to current terminal device
Q – 42 To increase the response time and throughput, the kernel minimizes the frequency of disk access by keeping a pool of internal data buffer called:
a) Pooling
b) Spooling
c) Buffer cache
d) Swapping
Ans- c) Buffer cache