250+ TOP MCQs on Built-in Commands and Answers

Linux / Unix questions and answers focuses on Built-in Commands in Linux Bash Shell. This is set-1.1. Which command sets up shorthand for command or command line?
a) set
b) alias
c) new
d) echo

Answer: b
Clarification: None.

2. What is the function of bind command in bash shell?
a) defining new macros
b) defining new key bindings for existing commands
c) dumping the installed key bindings
d) all of the mentioned

Answer: d
Clarification: None.

3. The command ‘compgen -c’ shows
a) all variable names
b) all system wide aliases
c) full list of all commands
d) none of the mentioned

Answer: c
Clarification: None.

4. Which statement resumes the next iteration of a for, while, select, or untill loop?
a) continue
b) break
c) complete
d) command

Answer: a
Clarification: None.

5. Which command prints the directory stack?
a) cd
b) dirs
c) popd
d) pushd

Answer: b
Clarification: None.

6. The command ‘disown -r’
a) removes all jobs
b) removes all running jobs
c) marks jobs to not receive SIGHUP when bash exits
d) marks all jobs

Answer: b
Clarification: None.

7. The command ‘enable -n ‘
a) enables the specified built-in command
b) disables the specified built-in command
c) print the status of the command
d) none of the mentioned

Answer: b
Clarification: None.

8. Which command can create environment variable?
a) export
b) set
c) read
d) none of the mentioned

Answer: a
Clarification: None.

9. Which command concatenate the specified argument into a single command, then execute the command?
a) fc
b) eval
c) exec
d) getopts

Answer: b

10. The command ‘hash’
a) manages a internal hash table
b) find and remember the full path name of the specified command
c) displays used command names and the number of hits
d) all of the mentioned

Answer: d

Leave a Reply

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