1. Navigating The System
Basic Commands
Question 1
Using a Linux machine, you have the following directory tree:
/
|-- home
| |-- cindy
| |-- Pictures
| |--Alaska
| |--Canada
| |-- Movies
|-- var
If your current path is /home/cindy/Pictures/Canada, and you want to change to the Alaska directory, which of the following commands can you use? Check all that apply.
- cd ~/Pictures/Alaska
- cd ../Alaska
- cd /Pictures/Alaska
- cd /home/cindy/Pictures/Alaska
Question 2
In Bash, which of the following commands can you use to view a long list of all files in the /home directory? Check all that apply.
- list -a /home
- ls -la /home
- ls -l -a /home
- ls -la ~
Question 3
In Bash, which of the following commands can you use to remove a directory named: “Miscellaneous Directory?”
- rm Miscellaneous Directory
- rm -r Miscellaneous Directory
- rm Miscellaneous\ Directory
- rm -r Miscellaneous\ Directory
To remove a directory you have recursively remove the files with -r. Don’t forget that folders with spaces in the name have to be escaped with an .
File and Text Manipulation
Question 1
In Bash, which of the following commands can you use to view the contents of a document. Check all that apply.
- open
- cat
- less
- dog
You can use the cat and less command to view the contents of a file.
Question 2
In a Linux machine, you have the following files:
- apple.txt
- banana.jpg
- chocolate.txt
- orange.txt
What command can you use to search for the word “fruit” in the text files in the above directory? Check all that apply.
- grep fruit apple.txt chocolate.txt orange.txt
- grep fruit *.txt
- find fruit apple.txt chocolate.txt
- find fruit apple.txt chocolate.txt orange.txt
You can use the grep command to search files for certain words. You can also use the * wildcard command to filter by a specific pattern.
Question 3
In a Linux machine, you have a file named “types_of_fish.txt” and you want to append the word “trout” to the file contents. Which of the following commands can you use?
- echo trout < types_of_fish.txt
- echo trout > types_of_fish.txt
- echo trout >> types_of_fish.txt
- echo trout 2> types_of_fish.txt
The >> is used as an append redirector.
Question 4
In a Linux machine, you want to list through a directory called /home/ben/Documents and search for the word “important” in the filenames in that directory. Which of the following commands can you use?
- ls /home/ben/Documents | grep important
- ls /home/ben/Documents >> grep important
- ls /home/ben/Documents < grep important
- ls /home/ben/Documents > grep important
You can use the | command to pipe the output of one command into another.
Graded Assessment
2. Users & Permissions
Permissions
Question 1
What are the basic linux file permissions? Check all that apply.
- Read
- Write
- Modify
- Execute
The three basic file permissions in Linux are read, write, and execute.
Question 2
You’re given the output of an ls -l of a file in Linux.
Answer the following question: What does the first character of output signify?
- books_file is a directory
- books_file is a disk device
- The file owner has delete permissions
- The file owner is a class D user
The first character in output reflects the type of directory entry; in this case, a directory.
Question 3
You’re given the output of an ls -l of a file in Linux.
Answer the following question: Who does the last trio of bits (r–) in the file permission and attributes refer to?
- All other users
- Group file belongs to
- Regular file
- File owner
The last trio of permission bits refers to the permission of all other users on the machine.
Question 4
You’re given the output of an ls -l of a file in Linux.
Answer the following question: What permissions does the second trio of bits (-wx) give you? Check all that apply.
- Read
- Execute
- Write
- Group file belongs to
Great work! w and x are the write and execute permissions.
Question 5
If I wanted to change permissions of a file called honey_bears, what command could I use to grant write access to the owner of the file without changing other permissions? The owner currently only has read access to the file. Check all that apply.
- chmod u+w honey_bears
- chmod o+w honey_bears
- chmod 644 honey_bears
- chmod 400 honey_bears
You can use the symbolic or numerical form of chmod to modify permissions, but to use the numerical form you need to know what all of the existing permissions are to avoid unintended changes
Graded Assessment
3. Package and Software Management
Device Software Management
Question 1
Which of the following is the piece of information that Windows will use to search for the right driver for a new piece of hardware connected to a Windows computer?
- PnP code
- Hardware ID
- Drive Identification Number, or DiD
The Hardware ID will be used by the operating system to search for the appropriate driver for the newly connected hardware device.
Question 2
In Linux, in the /dev directory, devices that start with sd can be associated with what type of device? Check all that apply.
- Speakers
- Hard drives
- USB drives
- Memory sticks
The /dev/sd* devices are associated with mass storage devices.
Question 3
Which of the following correctly describes a “Security Patch?”
- A piece of software that’s meant to fix up a security hole.
- A piece of fabric that’s meant to patch a broken cable.
- An entirely new, more secure, version of an operating system.
That’s the purpose of a security patch!
Package Managers
Question 1
Which of the following PowerShell commands will install the package “awesomesoftware” from the Chocolatey software source?
- Install-Package -Name awesomesoftware -Source chocolatey
- Install-Package -Name chocolatey -Source awesomesoftware
- Install-Package -Name awesomesoftware -Source MicrosoftWindows
This command will install a (fictional) package, using chocolatey as the software source.
Question 2
Before you install software, which of the following commands should you run to get an updated version of your software?
- apt install
- apt update
- apt remove
- apt search
Before you install any software, always make sure you’re pulling the latest software from your repositories with the apt update command.
Software Distribution
Question 1
What’s the difference between an EXE file and an MSI file? Check all that apply.
- An MSI file is an executable that can give you complete control over how your application should be installed.
- An EXE file is an executable that may have an MSI file as one its resources.
- MSI files are used by the Windows Installer to control how your application is installed.
An executable or EXE file can “wrap” an MSI file, which is used by the Windows Installer to guide the installation process of an application.
Question 2
When would you want to use an MSI file to guide the installation of a program, as opposed to an EXE?
- When you want complete, custom control over how the application is installed. x
- When you want to be able to install your application on Linux as well as Windows.
- When you want the Windows Installer to perform bookkeeping and setup for your application, at the cost of following the rules the Installer requires.
Using the Microsoft Installation Package format to guide a program’s setup is a good way to get a lot of functionality out of the box. It does mean you’ll need to follow the rules and format the Windows Installer requires.
Question 3
If you’re performing an installation from the command line in Windows, what’s the best method of checking out the options that the installation package provides? Check all that apply.
- Decide you don’t want to install the application from the command line and use the GUI instead.
- Try to use the /?, /h, or /help flags when running the package to see if they provide any helpful output.
- Consult the documentation for the application to see what options they provide.
Often the /?, /h and /help switches will give you some insight into what options the installer provides. Alternatively, you can check the documentation for the software to get the same information.
Question 4
What’s the difference between apt and dpkg? Check all that apply.
- dpkg is used as a standalone Debian package command.
- dpkg installs package dependencies.
- apt installs package dependencies.
- apt is used as a package manager.
The dpkg command is used as a standalone package installer, while the apt command is used as a package manager that installs package dependencies.
Question 5
Which of the following file extensions are considered archives in Windows? Check all that apply.
- .tar
- .exe
- .zip
- .rar
The .tar, .zip and .rar file extensions are used as archives. The .exe file extension is a Windows executable file.
Question 6
What’s the PowerShell commandlet you can use to extract and compress archives right from the commandline?
- 7Zip
- Compress-Archive
- tar
The Compress-Archive commandlet in PowerShell can help you work with Archives from the command line.
Question 7
What’s the purpose of a DLL in Windows?
- To guide the installation of a package via the Windows Installer
- To share a package of useful code among programs
- To take up space on your hard drive
A DLL, or Dynamic Linked Library, is loaded when a program is run, and provides useful code for the program.
Question 8
Most shared libraries in Windows are managed by which of the following?
- Left-and-right appendages, or LRAs
- Dynamic Linked Libraries, or DLLs
- Side-by-side assemblies, or SxS
The SxS system is used in Windows to manage shared libraries. Most of these shared libraries are stored in the C:\Windows\WinSxS folder.
Question 9
What’s the correct commandlet to use in order to find a software package in the available package sources from the PowerShell command line?
- Find-Package
- Get-PackageSource
- Register-PackageSource
The Find-Package commandlet is the way to go if you want to locate a particular package and its dependencies.
What’s happening in the background?
Question 1
Which of the following tools allows you to create or edit MSI files?
- Process monitor
- Orca
- Setup.exe
The Orca tool, that’s part of the Windows SDK, will let you work with MSI files.
Graded Assessment
4. FileSystem
Filesystem Types
Question 1
Which of the following is a characteristic of the FAT32 filesystem? Check all that apply.
- It doesn’t support files larger than 4GB.
- It’s read and write compatible with Windows, Mac, and Linux OSes.
- Its filesystem size can’t be larger than 32GB.
- It supports files up to 8GB in size.
Question 2
What’s the difference between a GPT and MBR partition table? Check all that apply.
- MBR only allows you to have volume sizes of 2TBs or less.
- MBR is the new standard for partition tables.
- GPT doesn’t have a limit to the amount of partitions you can make.
- GPT allows you to have volume sizes of 2TBs or greater.
MBR has a few legacy traits that are being slowly faded out by GPT.
Question 3
Before you can store files on a hard drive, which of the following has to be done? Check all that apply.
- Nothing; hard drives can be used to store files out of the box
- Format a filesystem
- Partition the disk
- Mount the filesystem
Question 4
You want to format a partition with NTFS, and know that the data you’ll be storing will consist mostly of many small files. In order to use as little space as possible, should you choose a larger or smaller Allocation Unit Size during the formatting process?
- Larger allocation unit size
- Smaller allocation unit size
With a smaller block size, you’ll waste less space if your files are small.
Question 5
In Linux, what could a device named /dev/sdb2 refer to?
- The first hard drive that was detected on the system
- The second partition of the second hard drive detected on the system
- The second B hard drive
- The first partition of the second hard drive detected on the system
Device partitions are denoted by numbers after the device drive.
Question 6
True or false: If you want to save space on a Windows computer, deleting the pagefile.sys file is a good idea.
- TRUE
- FALSE
You might free up some space by deleting the pagefile.sys, but this is the location of the swap file in Windows. If you remove it, then your programs will only use RAM memory, which might cause a performance degradation if you run out.
Question 7
Which of the following commands in Windows will create a symbolic link called “cauliflower” to a file named “broccoli.txt?”
- mklink cauliflower broccoli.txt
- mklink broccoli.txt cauliflower
- mklink /H cauliflower broccoli.txt
The mklink command will, by default, create symbolic links in the form of mklink .
Question 8
True or false: In modern versions of Windows, it’s necessary to periodically run a Disk Defragmentation process manually to keep your disk healthy.
- TRUE
- FALSE
Question 9
In Linux, what’s the difference between the commands df and du? Check all that apply.
- df is used to find the amount of free space on an entire machine.
- du is used to find the amount of disk usage on a specific directory.
- df is used to delete files in a directory.
- du is used to undelete files in a directory.
Question 10
In Linux, what’s the difference between a hardlink and a softlink? Check all that apply.
- A softlink points to a filename.
- A hardlink points to an inode.
- A hardlink points to a filename.
- You can view the hardlink count of a file using ls -l.
Question 11
Although NTFS is largely a self-healing filesystem, which of the following tools can you run to try to locate and repair serious disk corruption of the C: drive?
- chkdsk /r c:
- chkdsk c:
- fsck c:
The chkdsk utility, combined with the /r flag, will scan the filesystem on the drive supplied (in this case, C:) and attempt to fix any errors it encounters.
Question 12
If you want to automatically mount a filesystem on computer startup, what file do you have to modify?
- /etc/fstab
- /dev/sda
- /etc/sudoers
- /etc/group
To automatically mount filesystems on startup, you have to add a device entry to the /etc/fstab file.
Graded System
5. Process Management
Life of a Process
Question 1
True or false: Windows processes can operate independently of their parents.
- TRUE
- FALSE
Unlike in Linux, after a child process is created in Windows and inherits its parent’s environment, the parent process can be terminated and the child will continue to run.
Managing Processes
Question 1
Which of the following tools can help you gather information about the processes running on a Windows operating system?
- The Task Manager
- The tasklist utility from a command prompt
- The Get-Process commandlet from a PowerShell prompt
- All of the above
All of these tools can help you gather information about processes running on a Windows OS.
Question 2
If you restart a process using the Process Explorer utility, what will the new parent of that process be?
- cmd.exe
- Process Explorer
- windows.exe
- momanddad.exe
Since Process Explorer is the process that initiated the restart, it makes sense that the new parent of the process will be Process Explorer.
Process Utilization
Question 1
Which of the following PowerShell commands will tell you which process on your system is using the most CPU resources?
- Get-Process | Sort CPU -descending | Select -first 1 -Property ID,ProcessName,CPU
- Get-Process | Sort RAM -descending | Select -first 1 -Property ID,ProcessName,CPU
- cpu_usage.exe | top -1
That command will do the trick. It will filter the output of the Get-Process commandlet to determine the top user of the CPU resource, and give its Process ID, name, and the amount of CPU used.
Question 2
If you have a slow computer, what are some possible culprits that could be causing this?
- High CPU usage
- Lots of I/O activity
- High RAM usage
- Too many processes running
A slow computer could be a sign of lots of things, but it’s always smart to first check the utilization of your resources.
Question 3
In a Linux machine, what command can you use to safely terminate a process with a PID of 342?
- kill 342
- kill -KILL 342
- kill -TSTP 342
- kill -CONT 342
To terminate a process safely, send the SIGTERM signal.
Question 4
In a Linux machine, what command can you use to absolutely kill a process with a PID of 342?
- kill 342
- kill -KILL 342
- kill -TSTP 342
- kill -CONT 342
To kill a process, you’d use the SIGKILL signal.
Question 5
In a Linux machine, what command can you use to suspend a process with a PID of 342?
- kill 342
- kill -KILL 342
- kill -TSTP 342
- kill -CONT 342
To stop or suspend a running process, you’d send the SIGTSTP signal.
Graded Assessment
6. Operating System in Practice
Logging
Question 1
If you were investigating login issues on a Windows computer, which portion of the Event Viewer logs would be a good place to start your investigation?
- System
- Application and Services
- Security
The Security log would be a good place to start when troubleshooting login issues.
Question 2
In what log files can you find information about bootup errors? Check all that apply.
- /var/log/syslog
- /var/log/auth.log
- /var/log/kern.log
- /var/log/mail.log
You can find log information about bootup issues in kern.log as well as the syslog.
Question 3
In what log files can you find information about authentication errors?
- /var/log/syslog
- /var/log/auth.log
- /var/log/kern.log
- /var/log/mail.log
The auth.log file contains authentication log messages.
Question 4
For an ssh connection to work, which of the following need to be true? Check all that apply.
- SSH is installed on client.
- The SSH server is running on the host you want to connect to.
- VPN needs to be set up.
- You need to specify a hostname to SSH into.
Remote Access
Question 1
Which portion of the PuTTY package allows you to perform file transfers using the SCP (Secure Copy) protocol?
- pscp.exe
- psftp.exe
- pageant.exe
The pscp.exe tool, or PuTTY Secure Copy Client, will let you copy files to and from remote computers using SCP.