Obtain software, install packages, and manipulate compressed files.
Outcomes
Investigate repository packages that are available for installation.
Use graphical and command-line tools to install packages.
Archive a directory tree and extract archive content to another location.
As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.
[student@workstation ~]$ lab start software-review
Instructions
Using the GNOME Software application, install the Fedora Media Writer application from the Fedora Flatpak repository.
If the Fedora Flatpak repository is not available in the system, then use the oci+
https://registry.fedoraproject.org URL to add the repository.
Use the command line to add the Fedora Flatpak repository.
Verify that the Flatpak application is installed.
[student@workstation ~]$ flatpak --version
Flatpak 1.12.7Verify whether the Fedora Flatpak repository exists in the system.
[student@workstation ~]$ flatpak remotes
[student@workstation ~]$No repositories are available.
Add the Fedora Flatpak repository.
If you are prompted for a password, then use student.
[student@workstation ~]$ flatpak remote-add \
--if-not-exists fedora oci+https://registry.fedoraproject.orgOpen the GNOME Software application. From the main menu, select . Verify that the Fedora Flatpak repository is available.
The repositories listed in your classroom might be different.
Click the icon and enter fedora media writer into the search field.
Select the Fedora Media Writer application.
Click . After the application finishes installing, click to verify the installation.
On the command line, install the podman package.
Use sudo privilege for the student user to perform the installation.
Use student as the password.
Save the source name of the podman package to the ~/package_source.txt file.
The package_source.txt file must not contain empty lines, or leading or trailing white spaces.
Save the output of the podman --version command to the ~/podman_version.txt file.
Obtain information about the podman package.
[student@workstation ~]$dnf info podmanLast metadata expiration check: 0:00:14 ago on Mon Nov 27 21:02:58 2023. Available Packages Name : podman Epoch : 2 Version : 4.2.0 Release : 3.el9 Architecture : x86_64 Size : 12 M Source :podman-4.2.0-3.el9.src.rpm...output omitted...
The source name of the podman package is podman-4.2.0-3.el9.src.rpm.
The package source information might be different in your classroom.
Save the podman package source information to the ~/package_source.txt file.
[student@workstation ~]$ echo "podman-4.2.0-3.el9.src.rpm" > package_source.txtEdit the ~/package_source.txt file so that it does not contain empty lines or white spaces.
The file contents must look similar to the following example.
[student@workstation ~]$ cat package_source.txt
podman-4.2.0-3.el9.src.rpmInstall the podman package.
Use sudo privilege for the student user to perform the installation.
[student@workstation ~]$sudo dnf install podman[sudo] password for student:student...output omitted... Is this ok [y/N]:y...output omitted... Complete!
Save the output of the podman --version command to the podman_version.txt file in the student home directory.
[student@workstation ~]$podman --version > ~/podman_version.txt[student@workstation ~]$cat ~/podman_version.txtpodman version 4.2.0
Move all files in the ~/Documents directory that end with the .txt and .doc extensions to the ~/Projects directory.
Create the project-documents.tar.gz compressed file to back up the Projects directory.
Move all files in the Documents directory that end with the .txt and .doc extensions to the Projects directory.
[student@workstation ~]$mv Documents/*txt Projects/[student@workstation ~]$mv Documents/*doc Projects/
Review the contents of the Projects directory.
[student@workstation ~]$ ls Projects/
checklist.doc meeting.txt notes.txt report.docCreate the project-documents.tar.gz compressed file to back up the Projects directory.
[student@workstation ~]$ tar --create --gzip \
--file project-documents.tar.gz Projects/Verify that the project-documents.tar.gz compressed file exists.
[student@workstation ~]$ ls
...output omitted...
project-documents.tar.gz
...output omitted...The ~/finance.zip file contains scripts that are provided by your team.
Extract the compressed file and move the contents to the /usr/local/bin directory.
Use sudo privilege for the student user to move the files.
Extract the contents of the finance.zip file.
[student@workstation ~]$ unzip finance.zip
Archive: finance.zip
extracting: configure-keys.sh
extracting: create-documents.shVerify the extracted files.
[student@workstation ~]$ ls -l
...output omitted...
-rw-r--r--. 1 student student 0 Nov 27 22:20 configure-keys.sh
-rw-r--r--. 1 student student 0 Nov 27 22:20 create-documents.sh
...output omitted...Move the script files to the /usr/local/bin directory.
[student@workstation ~]$sudo mv *.sh /usr/local/bin/[sudo] password for student:student
Verify the contents of the /usr/local/bin directory.
[student@workstation ~]$ ls -l /usr/local/bin/
total 12
-rw-r--r--. 1 student student 0 Nov 27 22:20 configure-keys.sh
-rw-r--r--. 1 student student 0 Nov 27 22:20 create-documents.sh
...output omitted...