Chapter 4 - THM Flashcards

1
Q

whoiam

A

Find out what user we’re currently logged in as!

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

echo

A

Output any text that we provide

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

what option do we add to the find command if we want to find a specific file called passwords.txt?

Please type it out as well.

A

find -name passwords.txt

The find command will look through every folder in our current directory for that specific file

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

what is in the folder called /etc

A

This root directory is one of the most important root directories on your system.
The etc folder (short for etcetera) is a commonplace location to store system files that are used by your operating system.

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

what is in the folder called /var

A

var short for variable data. Is one of the main root folders found on a Linux install. This folder stores data that is frequently accessed or written by services or applications running on the system.

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

what is in the folder called /root

A

the /root folder is actually the home for the “root” system user. There isn’t anything more to this folder other than just understanding that this is the home directory for the “root” user. But, it is worth a mention as the logical presumption is that this user would have their data in a directory such as “/home/root” by default.

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

what is in the folder called /tmp

A

This is a unique root directory found on a Linux install. Short for “temporary”, the /tmp directory is volatile and is used to store data that is only needed to be accessed once or twice. Similar to the memory on your computer, once the computer is restarted, the contents of this folder are cleared out.

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

what is a PID

A

Process ID. Processes are the programs that are running on your machine. They are managed by the kernel, where each process will have an ID associated with it, also known as its PID. The PID increments for the order In which the process starts. I.e. the 60th process will have a PID of 60.

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

Explain the command ps

A

Use the ps command to provide a list of the running processes as our user’s session and some additional information such as its status code, the session that is running it, how much usage time of the CPU it is using, and the name of the actual program or command that is being executed

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

ps aux

A

To see the processes run by other users and those that don’t run from a session i.e. system processes

of course this is just a screen shot and not running in real time.

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

top

A

top gives you real-time statistics about the processes running on your system instead of a one-time view. These statistics will refresh every 10 seconds, but will also refresh when you use the arrow keys to browse the various rows.

Remember to use ctrl c to exit top

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

what command do we use to stop a PID?

how to we stop PID 1337

A

To kill a command, we can use the appropriately named kill command and the associated PID that we wish to kill.
i.e., to kill PID 1337, we’d use

kill 1337

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