Book Appointment Now
Hands-on Introduction to Linux Commands and Shell Scripting Quiz Answer
Table of Contents
Hands-on Introduction to Linux Commands and Shell Scripting Week 01 Quiz Answer
Practice Quiz: Introduction to Linux
Q1. Which of the following statements about Linux is NOT true?
- The Android operating system used in many smartphones uses a Linux-based kernel.
- Windows is based on the Linux operating system.
- Clusters of Linux servers can be used for high-performance computing applications.
- Enterprise and cloud data centers can run on Linux servers.
Q2. Which of the following is a Linux distribution?
- IBM AIX
- Debian
- FreeBSD
- Open Solaris
Q3. Which of the following is an example of a shell?
- Vim
- Yum
- Arch
- Zsh
Q4. Which of the following is the best definition of a Linux terminal?
- An application you can use to interact with the Linux shell
- An application you can use to edit text files
- An application you can use to install Linux software
- An application you can use to update Linux software
Q5. Which of the following text editors can you use in both GUI and command-line mode?
- emacs
- gedit
- GNU nano
- vim
Graded Quiz: Introduction to Linux
Q1. Which of the following statements about Linux distributions is NOT true?
- Each Linux distribution is tailored for a specific audience or task.
- A Linux distribution is also known as a distro.
- A Linux distribution must be based on the Linux kernel.
- There are only three types of Linux distribution: core, desktop, and server.
Q2. Which layer of the Linux system contains system daemons and shells?
- Application
- Kernel
- Operating system
- Hardware
Q3.Which layer of the Linux system assigns software to users, helps detect errors, and performs file management tasks?
- Kernel
- Operating system
- Hardware
- Application
Q4.Which layer of the Linux system is responsible for memory management, process management, device driver management, and system calls and security?
- Hardware
- Operating system
- Application
- Kernel
Q5. Which of the following is NOT a directory in the Linux filesystem?
- load
- home
- boot
- bin
Q6. Which of the following is a GUI-based text editor?
- gedit
- GNU
- nano
- vim
- vi
Q7. Which of the following is a path that you can use to navigate to a user’s home directory?
- ~
- \home
- \myhome
- \
Correct. The special path ~ refers to a user’s home directory.
Q8. Packages are:
- Kernels
- Backups
- Text editors
- Archive files
Q9. Which command can you use to convert package files between deb and RPM formats?
- alien
- update
- yum
- apt
Q10. An advantage of using a GUI-based package manager such as PackageKit is that:
- It automatically checks for updates at configurable intervals.
- It works on deb- and RPM-based Linux.
- It automatically installs new software packages.
- It always installs all available updates, so users cannot opt to only install specific updates.
Practice Quiz: Linux Commands
Q1. Which of the following is NOT one of the Linux shell definitions?
- Enable access to applications
- Interactive language Scripting language
- User interface for running commands
Q2. A Linux shell is an interface for running commands. It is also:
- A user-defined algorithm. An operating system.
- An interactive language.
- an error-logging script.
Q3.Which two of the following four commands could you use to list running processes and information
about each process?
man top
The “ps” command is used to display the currently running processes, including the time each process has
been running and other information.
Q4.Which one of the following four commands can be used to list the number of lines in your file?
cat wchead more
Q5.Which one of the following four statements about Linux commands for customizing your view of a file’s
contents is false?
The “grep” command returns lines of a file matching a specified pattern, such as a regular expression.You can use the paste command to merge lines from multiple files. You can use the cut command to extract specific sections from each line in your file. You can use the paste command to dump your clipboard’s content to a file.
Q6.Which of the following common shell commands for navigating files or directories prints the current
working directory?
pwd find cd ls
The touch command is used to ___________:
change the contents of an existing file or its access rights. create a file if it does not exist or otherwise delete it. create a file if it does not exist or otherwise update its “last-modified date” attribute.copy a file or modify its executable permission.
Q8. Which of the following statements are true?
The zip command can be used to parse a text file. The zip command can be used to archive files into a tarball. The tar command can be used to compress files.The zip command can be used to bundle files together into a single Linux kernel.
9. Similar to curl – the wget command is used to ___________.
wrangle a file to get user data and other useful information. retrieve the HTML code for a web page.write a file to a URL, including the HTML code to build a web page. upload GNU files to a web server for subsequent hash code analysis.
. wget can retrieve a file located at a URL or it can retrieve the HTML code for a web page and has
recursive file downloading capabilities.
10.Which two of the following four commands can you use to retrieve files or data from a URL?
ping curl
Correct. The “curl” command is a powerful tool that allows the transfer of data to and from URLs. ifconfig wget
Graded Quiz: Linux Commands and Shell Scripting
Q1. Which of the following shells is usually the default on Linux systems?
- Bourne shell
- ksh
- bourne again shell
- zsh
Q2. Which of the following common shell commands for working with files creates an empty file and updates a file timestamp?
- grep
- chmod
- wc
- touch
Q3. Which of the following common networking commands, displays or configures system network interfaces?
- curl
- ping
- ifconfig
- wget
Q4. What is one of the advantages of shell scripts over compiled languages?
- interpreted at runtime
- listed line by line in text files
- easier and faster to develop
- interactively enter commands on command line
Q5. Shell scripts are scripts that invoke a shell program. Which of the following invokes the Bourne shell program?
- #!/bin/bash
- #!/bin/zsh
- #!/bin/sh
- #!/bin/ksh
Q6. The ‘Hello World’ shell script example uses an ‘output redirection’ operator with the bash shebang. Which of the following symbols is used as the redirection operator?
- ‘double greater than symbol’ >>
- ‘double less than symbol’ <<
- ‘double pipe symbol’ ||
- ‘double plus sign symbol’ ++
Q7. What purpose does chaining filters together produce?
- Pipeline
- Multi-use script
- Modifier
- Examiner
Q8. What symbol do you use to define shell variables?
- greater than symbol >
- equal sign =
- plus sign +
- dollar sign $
Q9. Which command lists all environment variables?
- env
- grep
- export
- gree
Q10. Which of the following is the cron job syntax?
- time day date command
- command m h dom mon dow
- crontab -e
- m h dom mon dow command
Get all Course Quiz Answers of IBM Data Warehouse Engineer Professional Certificate
Introduction to Data Engineering Coursera Quiz Answers
Introduction to Relational Databases (RDBMS) Quiz Answers
Databases and SQL for Data Science with Python Quiz Answers
Hands-on Introduction to Linux Commands and Shell Scripting Quiz Answers
Relational Database Administration (DBA) Quiz Answers
ETL and Data Pipelines with Shell, Airflow and Kafka Quiz Answers
Getting Started with Data Warehousing and BI Analytics Quiz Answers