Linux Questions & Answers on Shell Environment for Freshers

1. 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
Answer: c
2. Which of the following commands allows definition and assignment of environment variables under bash

a) env
b) export
c) environ
d) setenviron
Answer: a
3. 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
Answer: b
4. Which variable contains current shell process id

a) $*
b) $?
c) $$
d) $!
Answer: c
5. Which command is used to debug a shell script program

a) set
b) set -x
c) debug
d) db
Answer: b
6. For every successful login, which script will be executed?

a) /etc/inittab
b) /etc/profile
c) /etc/login
d) /etc/init
Answer: b
7. 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
Answer: c
8. Shell is ?

a) Command Interpreter
b) Interface between Kernel and Hardware
c) Interface between user and applications
d) Command Compiler
Answer: a
9. 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
Answer: c
10. 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
Answer: c
11. 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
Answer: c
12. 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
Answer: a
13. Which of the following represents an absolute path?

a) ../home/file.txt
b) bin/cat
c) cs2204/
d) /usr/bin/cat
Answer: d
14. 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
Answer: a
15. BASH shell stands for?

a) Bourne-again Shell
b) Basic Access Shell
c) Basic to Advanced Shell
d) Big & Advanced Shell
Answer: a
16. Which of the following files will not be displayed by the command cat re* ?

a) reminder
b) receipt
c) Receipt
d) recipe-cake
Answer: c

Related

Multiple Choice Questions 4290221683937455636

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item