Linux Bash Shell Questions & Answers – Built-in Commands – 1

This set of 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
View Answer

Answer: b
Explanation: 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
View Answer

Answer: d
Explanation: 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
View Answer

Answer: c
Explanation: None.

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

Answer: a
Explanation: None.
advertisement
advertisement

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

Answer: b
Explanation: 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
View Answer

Answer: b
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube

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
View Answer

Answer: b
Explanation: None.

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

Answer: a
Explanation: None.
advertisement

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

Answer: b
Explanation: None.

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
View Answer

Answer: d
Explanation: None.
advertisement

Sanfoundry Global Education & Learning Series – Linux Administration & Programming.

Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.

To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.