The third week of this course will turn the spotlight on package and software management in the Windows and Linux environments. Installing packages and understanding management of devices and drivers, as well as the software to be administered in Windows and Linux, is extremely important for effective system administration. It will also cover various packaging and file compression methods. By the end of this module, you will be able to create, update, and remove software using Windows GUI, Windows CLI, and Linux shell.
Learning Objectives:
- To distinguish methods of packaging and file compression.
- To understand the Windows and Linux installation of packages.
- To know how devices and drivers are managed in Windows and Linux.
PRACTICE QUIZ: SOFTWARE DISTRIBUTION
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. (CORRECT)
- MSI files are used by the Windows Installer to control how your application is installed. (CORRECT)
Great work! Windows Installer uses the MSI file to manage the installation process of an application. The EXE file can encapsulate this file.
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 the Windows Installer to perform bookkeeping and setup for your application, at the cost of following the rules the Installer requires. (CORRECT)
- When you want complete, custom control over how the application is installed.
- When you want to be able to install your application on Linux as well as Windows.
You got it! Using the Microsoft Installation Package format for conducting installations of applications empowers all the built-in functionalities. The aspect of such usage, however, yields a stringency to the requirements for formatting and rules set by the Windows Installer.
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.
- Consult the documentation for the application to see what options they provide. (CORRECT)
- 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. (CORRECT)
Right on! Those alternatives are rather, as earlier said, the /?, /h and /help parameters, which usually have descriptions of what parameters should be taken with the installer. If all else fails, check documentation of the particular software.
4. What’s the difference between apt and dpkg? Check all that apply.
- dpkg is used as a standalone Debian package command. (CORRECT)
- dpkg installs package dependencies.
- apt installs package dependencies. (CORRECT)
- apt is used as a package manager. (CORRECT)
Great job! The dpkg command serves as a package manager included standalone for installing individual .deb files, while the apt command is used as a package manager to not only install packages but to resolve the necessary dependencies as well.
5. Which of the following file extensions are considered archives in Windows? Check all that apply.
- .tar (CORRECT)
- .exe
- .zip (CORRECT)
- .rar (CORRECT)
You nailed it! Files with the extensions .tar, .zip, and .rar are compressed or archived files that often contain one or several files packed for the sake of compression or distribution. .exe signifies a Windows executable file that may run as a program under Windows Operating Systems.
6. What’s the PowerShell commandlet you can use to extract and compress archives right from the commandline?
- tar
- Compress-Archive (CORRECT)
- 7Zip
Wohoo! The Compress-Archive commandlet in PowerShell can help you work with Archives from the command line.
7. What’s the purpose of a DLL in Windows?
- To take up space on your hard drive
- To guide the installation of a package via the Windows Installer
- To share a package of useful code among programs (CORRECT)
Nice job! A DLL or Dynamic Link Library is a file that gets loaded when a program is running to share code or functions the program might need to perform specific tasks.
8. Most shared libraries in Windows are managed by which of the following?
- Side-by-side assemblies, or SxS (CORRECT)
- Dynamic Linked Libraries, or DLLs
- Left-and-right appendages, or LRAs
Awesome work! The SxS (Side-by-Side) system in Windows effectively manages shared libraries, allowing multiple versions of the same library to coexist. Such libraries are typically extant in the folder C:\Windows\WinSxS, after which programs are set to use an appropriate version of a library without the possibility of conflict.
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?
- Get-PackageSource
- Register-PackageSource
- Find-Package (CORRECT)
Great work! The Find-Package cmdlet is basically utilized in finding out a certain package and its dependencies in PowerShell, as you use it to do searches for and retrieve information about packages available in registered repositories.
10. What’s the file extension of a debian package?
- .rpm
- .pkg
- .dmg
- .deb (CORRECT)
Nice job! This also falls under the category of .deb extension file- which is a Debian package file used to distribute software on a debian-based operating system, like Ubuntu. It has all the source files and metadata that are needed for the installation of the program.
PRACTICE QUIZ: PACKAGE MANAGERS
1. Which of the following PowerShell commands will install the package “awesomesoftware” from the Chocolatey software source?
- Install-Package -Name awesomesoftware -Source chocolatey (CORRECT)
- Install-Package -Name chocolatey -Source awesomesoftware
- Install-Package -Name awesomesoftware -Source MicrosoftWindows
Nice job! Use <package-name> in place of the respective package name to install it. Chocolatey is a package manager for Windows simplifying the installing and management of software.
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 (CORRECT)
- apt remove
- apt search
Great job! As a first step, the apt update command has to be run before installing any software. It updates the database of the available packages and the information related to those packages in the system.
3. In Ubuntu, where are repository sources listed?
- /etc/repository_sources
- /etc/apt/sources.list (CORRECT)
- /etc/resolv.conf
- /var/syslog
Wohoo! On the dependencies, Debian-based Linux distributions have such source lists specified in the /etc/apt/sources.list file. These software repositories will have URLs appended to download packages and include them for installation.
PRACTICE QUIZ: WHAT’S HAPPENING IN THE BACKGROUND?
1. Which of the following tools allows you to create or edit MSI files?
- Process monitor
- Orca (CORRECT)
- Setup.exe
You nailed it!The Orca is a part of the Windows SDK which allows manipulation of MSI files. Orca has a graphical interface for editing and inspecting the tables, properties, and custom actions of an MSI file to modify or troubleshoot an installation.
PRACTICE QUIZ: DEVICE SOFTWARE MANAGEMENT
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 (CORRECT)
- Drive Identification Number, or DiD
Nice job! Each newly connected hardware device is identified by the corresponding hardware ID to the operating system for finding and installing the relevant driver. Only after matching with the right driver can the device function correctly with the system.
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 (CORRECT)
- USB drives (CORRECT)
- Memory sticks (CORRECT)
Great work! The devices /dev/sd* in Linux are the mass storage devices or drives, for example, hard drives, solid-state drives (SSDs), and USB drives, among others. For that matter, sd is just an abbreviation for the word used for SCSI (Small Computer System Interface) devices that only attribute to these types of devices but also to SATA, SAS, and USB devices. The * is a symbol for a device identifier like /dev/sda /dev/sdb, etc.
3. Which of the following correctly describes a “Security Patch?”
- A piece of software that’s meant to fix up a security hole. (CORRECT)
- A piece of fabric that’s meant to patch a broken cable.
- An entirely new, more secure, version of an operating system.
Awesome! A security patch is a tool utilized to correct vulnerabilities or weaknesses in the software or a system to thwart any exploitations by attackers. It aids in the making secure and stable the system by fixing known issues to be targeted by the malicious attackers.
4. What command can you use to see the version of the kernel on your Linux system?
- uname -r (CORRECT)
- dpkg -l
- apt
- 7z
Yep! The kernel version running on your Linux system would be displayed when the uname -r command is executed. It indicates in bits about the Linux kernel version currently running on your machine.