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 ?

A

grep

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.

A

&

24
Q

What does the & operator do ?

A

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

25
Q

This operator allows you to combine multiple commands together in one line of your terminal.

A

&&

26
Q

What does the ‘&&’ operator do ?

A

Allows you to combine multiple commands together in one line of your terminal.

27
Q

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.

A

>

28
Q

What does the ‘>’ operator do ?

A

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
Q

This operator does the same function of the > operator but appends the output rather than replacing (meaning nothing is overwritten).

A

> >

30
Q

What does the ‘»’ operator do ?

A

This operator does the same function of the > operator but appends the output rather than replacing (meaning nothing is overwritten).

31
Q

What command could we run to create a file named “welcome” with the message “hey”.

A

echo hey > welcome

32
Q

What command could we run to add ‘hello’ to the end of our file called ‘welcome’

A

echo hello&raquo_space; welcome

33
Q

What is the command to log in remotely using SSH ?

A

‘ssh’ and the username of the account @the ip address of the the machine.

ssh tryhackme@10.10.97.49

34
Q

What command will list all files including those ones that might be hidden ?

A

ls –all

35
Q

What does ‘ls –all’ do ?

A

Lists all files, even those that might be hidden

36
Q

What is the switch to bring up the options for each command ?

A

–help

e.g ‘ls –help’

37
Q

what is the command to access the documentation on the manual page ?

A

man plus the command we want to see the manual for

man ls

38
Q

What flag would we use to display the output in a “human-readable” way?

A

ls -h

39
Q

What does “touch” do ?

A

create a file

40
Q

What does “mkdir” do ?

A

Create a folder

Make a Directory.

41
Q

What does “cp” do ?

A

Copy a file or folder

42
Q

What does “mv” do ?

A

Move a File or Folder

43
Q

What does “rm” do ?

A

Remove a file or folder ?

44
Q

What does “file” do ?

A

Determine the type of a file.

45
Q

What tag do we need to add to “rm” to remove a directory ?

A

-R