Kali Linux Commands Flashcards

1
Q

What does ‘echo’ do ?

A

Output any text that we provide

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

What command outputs any text that we provide ?

A

echo

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

what does ‘whoami’ do ?

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
4
Q

What command lets us know what user we are currently logged in as ?

A

whoami

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

What does ‘ls’ do ?

A

listing

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

What is the command for listing ?

A

ls

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

what does ‘cd’ do ?

A

change directory

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

What is the command to change directory ?

A

cd

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

What does ‘cat’ do ?

A

concatenate

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

What is the command to concatenate ?

A

cat

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

What is the command to print the working directory ?

A

pwd

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

What does ‘pwd’ do ?

A

Print Working Directory

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

How can you list the contents of a directory without having to navigate to it

A

‘ls’ and the name of the directory

e.g ‘ls my documents’

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

What does the concatenate command do ?

A

Output the content of a file. Not just the text files

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

Command to go back to previous directory

A

cd -

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

What does ‘cd -‘ do ?

A

go back to previous directory

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

If we remember the filename, what command can we use so that the command will look through every folder in our current directory for that specific file.

A

‘find -name’ and the name of the file

e.g ‘find -name password.txt’

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

what character is the wildcard ?

A

*

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

What command can we run to find the name of every .txt file ?

A

find -name *.txt

20
Q

What does ‘grep’ do ?

A

Allows us to search the contents of files for specific values that we are looking for.

21
Q

What command allows us to search the contents of files for specific values that we are looking for ?

22
Q

What command would you run to use grep on “access.log” to find the flag that has a prefix of “THM”. What is the flag?

A

grep THM access.log

23
Q

This operator allows you to run commands in the background of your terminal.

24
Q

What does the & operator do ?

A

Allows you to run commands in the background of your terminal.

25
This operator allows you to combine multiple commands together in one line of your terminal.
&&
26
What does the '&&' operator do ?
Allows you to combine multiple commands together in one line of your terminal.
27
This operator is a redirector - meaning that we can take the output from a command (such as using cat to output a file) and direct it elsewhere.
>
28
What does the '>' operator do ?
This operator is a redirector - meaning that we can take the output from a command (such as using cat to output a file) and direct it elsewhere.
29
This operator does the same function of the > operator but appends the output rather than replacing (meaning nothing is overwritten).
>>
30
What does the '>>' operator do ?
This operator does the same function of the > operator but appends the output rather than replacing (meaning nothing is overwritten).
31
What command could we run to create a file named "welcome" with the message "hey".
echo hey > welcome
32
What command could we run to add 'hello' to the end of our file called 'welcome'
echo hello >> welcome
33
What is the command to log in remotely using SSH ?
'ssh' and the username of the account @the ip address of the the machine. ssh tryhackme@10.10.97.49
34
What command will list all files including those ones that might be hidden ?
ls --all
35
What does 'ls --all' do ?
Lists all files, even those that might be hidden
36
What is the switch to bring up the options for each command ?
--help e.g 'ls --help'
37
what is the command to access the documentation on the manual page ?
man plus the command we want to see the manual for man ls
38
What flag would we use to display the output in a "human-readable" way?
ls -h
39
What does "touch" do ?
create a file
40
What does "mkdir" do ?
Create a folder | Make a Directory.
41
What does "cp" do ?
Copy a file or folder
42
What does "mv" do ?
Move a File or Folder
43
What does "rm" do ?
Remove a file or folder ?
44
What does "file" do ?
Determine the type of a file.
45
What tag do we need to add to "rm" to remove a directory ?
-R