WK2 (LAB WORK) Resources for completing Linux labs Flashcards

1
Q

Helpful Linux Keyboard shortcuts

A

Helpful navigation tips and keyboard shortcuts

The following contains a list of navigation tips and keyboard shortcuts you may find useful when completing your Linux labs. Your cursor must be in the terminal window to use these navigation tips and keyboard shortcuts.

CTRL + C: Terminates a command that is currently running; from the instructions portion of Qwiklabs, you can use CTRL + C to copy, but within the terminal, it will only terminate a command and if one isn’t running, it will display ^C at the prompt

CTRL + V: Pastes text

clear: Clears the terminal screen; this can also be done by entering CTRL + L

CTRL + A: Sets your cursor at the beginning of a command

CTRL + E: Sets your cursor at the end of a command

Left arrow key: Moves left within a command

Right arrow key: Moves right within a command

Up arrow key: Provides the last command you entered into the command line; can be entered multiple times to go through multiple commands from the command history

Down arrow key: Provides the next command in the command history; must be after using the up arrow key

Tab key: Provides available suggestions for completing your text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Task 1. Ensure that APT is installed

A

First, you’ll check that the APT application is installed so that you can use it to manage applications. The simplest way to do this is to run the apt command in the Bash shell and check the response.

The Bash shell is the command-line interpreter currently open on the left side of the screen. You’ll use the Bash shell by typing commands after the prompt. The prompt is represented by a dollar sign ($) followed by the input cursor.

Confirm that the APT package manager is installed in your Linux environment. To do this, type apt after the command-line prompt and press ENTER.
When installed, apt displays basic usage information when you run it. This includes the version information and a description of the tool:

APT is already installed by default in the Linux Bash shell in this lab because this is a Debian-based system. APT is also the recommended package manager for Debian. If you’re using another distribution, a different package manager, such as YUM, may be available instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Task 2. Install and uninstall the Suricata application

A

n this task, you must install Suricata, a network analysis tool used for intrusion detection, and verify that it installed correctly. Then, you’ll uninstall the application.

Use the APT package manager to install the Suricata application.
Type sudo apt install suricata after the command-line prompt and press ENTER.

Note: The apt install and apt remove commands must be prefixed with the sudo command as elevated privileges are required to install and uninstall software in Linux.
The Suricata application can take a few minutes to install.

When you install an application with APT, the output displays details of all the software to be installed. This may include additional applications that depend on the new software. These additional applications are called the dependencies of the software to be installed.

When prompted to continue, press the ENTER key to respond with the default response. (In this case, the default response is Yes.)

Verify that Suricata is installed by running the newly installed application.
Type suricata after the command-line prompt and press ENTER.

When Suricata is installed, version and usage information is listed:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Task 3: Use the APT package manager to uninstall Suricata.

A

Type sudo apt remove suricata after the command-line prompt and press ENTER. Press ENTER (Yes) when prompted to continue.

When prompted to continue, press the ENTER key to respond with the default response. (In this case, the default response is Yes.)

Verify that Suricata has been uninstalled by running the application command again.
Type suricata after the command-line prompt and press ENTER.

If you have uninstalled Suricata, the output is an error message:

-bash: /usr/bin/suricata: No such file or directory
This message indicates that Suricata can’t be found anymore.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Task 4 Install the tcpdump application

A

In this task, you must install the tcpdump application. This is a command-line tool that can be used to capture network traffic in a Linux Bash shell.

Use the APT package manager to install tcpdump.
Type sudo apt install tcpdump after the command-line prompt and press ENTER.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Task 5 List the installed applications

A

Next, you need to confirm that you’ve installed the required applications. It’s important to be able to validate that the correct applications are installed. Often you may want to check that the correct versions are installed as well.

Use the APT package manager to list all installed applications.
Type apt list –installed after the command-line prompt and press ENTER.

This produces a long list of applications because Linux has a lot of software installed by default.

Search through the list to find the tcpdump application you installed.
The Suricata application is not listed because you installed and then uninstalled that application:


tcpdump/oldstable,now 4.9.3-1~deb10u2 amd64 [installed]

Note: The specific version of tcpdump that you see displayed may be different from what is shown above.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Task 6: Reinstall the Suricata application

A

In this task, you must reinstall the Suricata application and verify that it has installed correctly.

Run the command to install the Suricata application.
Type sudo apt install suricata after the command-line prompt and press ENTER.

When prompted to continue, press the ENTER key to respond with the default response. (In this case, the default response is Yes.)

Use the APT package manager to list the installed applications.
Type apt list –installed after the command-line prompt and press ENTER.

Search through the list to confirm that the Suricata application has been installed.
The output should include the following lines:


suricata/oldstable,now 1:4.1.2-2+deb10u1 amd64 [installed]

tcpdump/oldstable,now 4.9.3-1~deb10u2 amd64 [installed]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Lab work conclusion
useful for cv linked in

A

Conclusion

Great work!

You now have practical experience with the APT package manager. You learned to

install applications,
uninstall applications, and
list installed applications.
Being able to manage installed applications in Linux is a key skill for any security analyst.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly