Chapter 1 review questions
1. Which of the following components comprise an operating
system?
User interface, kernel, device drivers, and services.
2. Which of the following kernels are development kernels?
2.3.4 and 5.10-rc5.
3. Many types of software are available today. Which type of
software does Linux represent?
Open source software.
4. Which of the following are characteristics of open source
software (OSS)?
The software is developed collaboratively, and bugs are fixed quickly.
5. To which license does Linux adhere?
GNU General Public License (GPL).
6. What are some good reasons for using Linux in a corporate
environment?
Linux software is unlikely to be abandoned by its developers, Linux is
secure and has a lower total cost of ownership, and Linux supports many
hardware platforms and programming languages.
7. Which of the following are common methods for gaining
support for Linux?
Websites, Linux User Groups, and online forums.
8. Which two people are credited with creating the UNIX
operating system?
Dennis Ritchie and Ken Thompson.
9. On which types of systems can Linux be installed?
IoT devices, supercomputers, servers, and workstations.
10. Who formed the Free Software Foundation to promote open
development?
Richard Stallman.
11. Which culture embraced the term “GNU” (GNU’s Not UNIX)
and laid the free software groundwork for Linux?
The hacker culture.
12. Linux was developed by whom to resemble which operating
system?
Linus Torvalds developed Linux to resemble MINIX.
13. When the core components of the Linux operating system are
packaged together with other open source software, it is called a:
Linux distribution.
14. Which common desktop environments are available in most
Linux distributions?
GNOME and KDE.
15. Which of the following are factors that determine which Linux
distribution a user will use?
Package manager support, hardware platform, kernel features, and
language support.
16. What is a common open source web server available for
Linux?
Apache.
17. Which component is required to run Linux virtual machines?
A hypervisor.
18. Which Linux distribution is most likely to be used by a
cybersecurity worker?
Kali Linux.
19. When Linux is hosted within a container on a cloud provider,
what cloud delivery model is being used?
Platform as a Service (PaaS).
20. What component within a continuous deployment (CD)
workflow creates a new virtual machine or container to host the
web application?
The build automation server
Chapter 2 review questions
1. What is the default shell on most Linux systems called?
d. BASH
2. What equivalent to the man command generally provides an
easier-to-read description and contains links to related
information?
d. info
3. What command can you use to safely shut down the Linux
system immediately?
d. halt
4. What command is equivalent to the man –k keyword command?
c. apropos keyword
5. Which of the following is NOT information that the Fedora
installation program prompts you for?
c. firewall settings
6. Linux commands entered via the command line are not case
sensitive.
b. False
7. Which command blanks the terminal screen, erasing previously
displayed output?
d. clear
8. When sitting at a computer running Linux, what key
combination switches to a graphical login screen?
d. Ctrl + Alt + F7
9. To install Linux within a virtual machine, you can specify the
path to an ISO image without writing it to DVD or USB first.
a. True
10. After you log in to a terminal, you receive a user interface
called a _____.
b. shell
11. Users enter commands directly to the kernel of the Linux
operating system.
b. False
12. How can you protect a metacharacter (such as $) from shell
interpretation?
b. Precede it with a backslash ( \ ).
13. You know a Linux command will flush a variable, but you
cannot remember its full name. Which command displays related
commands?
a. man –k flush
14. Which command displays users currently logged in to the
Linux system?
b. who
15. Which prompt does the root user receive when logged in?
c. #
16. Which prompt do regular users receive when logged in?
a. $
17. Which refers to the third primary partition on the second SAS
hard disk drive?
sdb3
18. Which three partitions are typically created during a Fedora
Workstation installation on a system with a UEFI BIOS?
./
swap
/boot/efi
19. If you boot your computer from Linux live media, you can use
a fully functional Linux system before installation.
True
20. Which is NOT an example of virtualization software used to
install Linux inside another OS?
Spiceworks
Complete Project 2-1
Complete Project 2-2
1. Which prompt did you receive and why?
I received the prompt user1@hostname:~$. This prompt shows up
because I logged in as a regular user (user1). The dollar sign ($) tells me
that the user does not have administrative (root) privileges.
2. What happened after typing sudo passwd root and entering the
passwords?
It set the password for the root user to LINUXrocks!. That lets the root
account get enabled for logging in. I am not totally sure if there are any
other steps after that. It seems straightforward though.
3. Why did you receive an error message after typing Date instead of
date? Can you tell which shell gave you the error message?
In Linux, commands have to match the case exactly, I think thats why
date works fine but when you try Date it just doesnt recognize it at all.
Like, the system treats them as different things.
That error message popped up because of the Bash shell handling it. Bash
is the default shell for a lot of Linux stuff, right. It seems picky about those
little details.
4. Which prompt did you receive after logging in as root on tty5 and why?
When I logged in, the prompt showed up as root at hostname with a tilde
and hash, like root@hostname:~#.
thats because Im using the root user account.
The hash symbol there, the #, it points to having admin privileges, you
know, the root level stuff.
Sometimes it feels a bit tricky to remember exactly why that appears right
away.
5. Who is logged in and on which terminal?
The user user1 is logged in on tty3, and the root user is logged in on tty5.
6. Did you need to log in again when switching back to tty3? Are the
outputs from the date and Date commands still visible?
No, I did not need to log in again. Yes, the outputs from the date and Date
commands were still visible because the terminal session remained
active.
7. What did the last command (exit) do?
The exit command logged me out of the current shell and ended the
terminal session.
8. What happened after typing exit on tty5?
By typing exit on tty5 logged out the root user and returned the terminal
to the login prompt.
Project 2-3
1. What desktop environment is started by default when logging in to the
graphical terminal, and which display server does it use?
The GNOME desktop environment starts by default. It uses the Wayland
display server.
2. What prompt do you receive when opening the Terminal in GNOME, and
why?
The prompt i received is [user1@localhost ~]$
This appears because the terminal opens a BASH shell while logged in as
the user1 account, not as root.
3. After typing who, what terminal are you logged into?
The terminal is tty2, which is where the GNOME graphical desktop session
runs.
4. Is GDM still available on tty1 after switching terminals?
Yes the GDM (GNOME Display Manager) is still available on tty1 and the
graphical desktop session continues running on tty2.
5. What happens when you switch to the root user using su –?
When u switch to root you are logged in as the root user and the
command prompt changes to indicate root access, usually ending with #
instead of $.
6. What command is used to install the KDE desktop, and what happens
during installation?
The command used to install the KDE desktop would be dnf groupinstall
KDE Plasma Workspaces
7. How do you start the KDE desktop environment after rebooting?
To start the KDE desktop you would GDM login screen, click the settings
(cog wheel) icon and Select Plasma (X11) finally enter the password and
sign in.
8. How does application navigation in KDE differ from GNOME?
The application navigation differs because KDE uses a Start-menu–style
launcher similar to Windows and GNOME uses an Activities overview with
a grid of applications. KDE also provides more traditional menus and
customization options.
9. Why does the who command display :0 instead of a tty number in KDE?
The who command displays 0 because KDE is running on [Link] (X11),
which uses display numbers such as :0. The terminal windows inside the
desktop are pseudo terminals (pts) instead of ttys.
10. When opening a new terminal tab and running who, do you see an
additional session?
Yes when running who an additional pseudo terminal session (such as
pts/1) appears. And each terminal tab creates a new pts session.
11. What happens when you log out of the KDE desktop?
When you log out the KDE desktop The KDE desktop session ends. And
you are returned to the GDM login screen, where you can choose another
desktop environment or log in again.
Project 2-5
1. Switch to tty5 and log in as root. What happens?
You can switch to tty5 by Pressing Ctrl + Alt + F5 switches to tty5. You
need to log in as root with password LINUXrocks! provides full
administrative access to the system.
2. What is the purpose of the ; metacharacter when running date;who?
The semicolon ( ; ) allows multiple commands to be entered on one line.
And it tells the shell to execute the second command after the first,
regardless of whether the first command succeeds.
3. What is displayed after running echo This is OK?
This is OK
When running the echo command displays the text exactly as entered.
4. Which character needs to be protected in echo Don't do this, and why?
The character the needs to be protected is the apostrophe ( ' ) and the
shell interprets it as the start of a quoted string, causing the command to
wait for closure.
5. What is displayed after running echo "Don't do this"?
Don't do this
The double quotation marks allow the apostrophe to be treated as literal
text so it prints it
6. What is displayed after running echo Don\'t do this?
Don't do this
This is displayed because the backslash escapes the apostrophe,
preventing shell interpretation.
7. What is displayed when running echo $SHELL and echo $TEST?
when running echo $SHELL this displays the path of the active shell
/bin/bash
echo $TEST displays nothing because the variable does not exist
8. What happens when running echo You have $4.50?
When running echo you have 4.50 this is displayed
You have .50
The shell attempts to expand $4 as a variable, which is undefined. The $
(dollar sign) must be protected. There are two ways to protect it to use
quotation marks and use a backslash (\$)
9. What is displayed after running echo 'You have $4.50'? Did single
quotes work?
This is displayed You have $4.50
Yes single quotation marks completely prevent shell interpretation.
10. What is displayed after running echo "You have $4.50"? Did double
quotes work?
this is displayed you have .50
no double quotation marks still allow variable expansion
11. What is displayed after running echo You have \$4.50? Did the
backslash work?
This is displayed you have $4.50
yes the backslash protects the metacharacter from interpretation.
12. What function do back quotes perform in echo My name is \whoami``?
The back quotes perform command substitution. The output of the
whoami command is inserted into the echo command.
Project 2-6
Question 1. How do you switch to a command-line terminal (tty5) and log
in?
You would do this by pressing Ctrl+Alt+F5 and then log in using root as
the username and LINUXrocks! as the password.
Question 2. How do you find all manual pages related to cron?
You would type man -k cron at the command prompt.
Question 3. How many manual pages exist for crontab? Are they different
types?
there are typically two manual pages crontab(1) (command) and
crontab(5) (file format). yes they are different types.
Question 4. How do you view the manual page for the crontab command?
you view manual page by typing man crontab and press q to quit.
Question 6. How do you view a list of GNU info pages?
you would type info and press q to quit.
Question 7. How do you view syntax information about the date command
using info?
You can view this information by typing info date and press q to quit.
Question 8. How do you view a list of BASH shell functions that have
documentation?
To view the list of bash shell functions would be type help. Use Shift+Page
Up or Shift+Page Down to scroll
Question 9. How do you view information about the exit command in
BASH?
you would type help exit.
Question 10. How do you log out of the shell?
to log out