Chapter 2: Getting Comfortable with Kali Linux Flashcards

1
Q

What command is used to view manuals?

A

man

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

What command is used to search for keywords amongst manuals?

A

man -k

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

Using regular expressions how can we narrow the search for the man keyword?

A

man -k ‘^passwd$’

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

What does apropos do?

A

Search for keywords amongst manual page descriptions.

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

What does ls, the -a and -l switches do?

A

ls shows the directory contents. -a shows all files and -l displayed each file on a separate line (good for automation).

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

What does pwd do?

A

Print working directory.

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 does mkdir do? How do we make multiple folders and subfolders at once?

A

mkdir makes a file or directory. To create multiple at once use mkdir -p test{test1,test2,test3}

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

What does the which command do?

A

Searches for files in the PATH variable

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

How do you look at the $PATH variable

A

echo $PATH

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

What does the locate command do and why is it unique? How do we update the database?

A

It searches for files in kali and is updated through a database to shorten waiting time.

We update the database through sudo updatedb

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

How do we use the find command? Use an example

A

find

find / -name sbd*

find is the command, / is the directory (root) -name is the switch and sbd* is the keyword.

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

How do we start the ssh service?

A

sudo systemctl start ssh

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

How do we verify sshd has started one we’ve used the systemctl command?

A

sudo ss -antlp | grep sshd

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

How do we enable ssh to run on start up?

A

sudo systemctl enable ssh

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

How do we start apache/HTTP service?

A

sudo systemctl start apache2

17
Q

How do we verify that apache has started?

A

sudo ss -antlp | grep apache

18
Q

How do we allow apache2 to start at boot time?

A

sudo systemctl enable apache2

19
Q

How do we show a list showing all services that can be used with systemctl?

A

systemctl list-unit-files

20
Q

How do we update the APT (advanced package tool) cache for faster installation?

A

sudo apt update

21
Q

How do we upgrade using apt?

A

sudo apt upgrade

22
Q

How do we upgrade a single program?

A

sudo apt upgrade

e.g. sudo apt upgrade metasploit-framework

23
Q

What is apt cache, how do we use it?

A

apt-cache stores information on potential upgrades.

To see if a particular program is present, use apt-cache search pure-ftpd

24
Q

How do we install using apt?

A

sudo apt install

25
Q

What are the two commands that remove programs and what is the difference?

A

sudo apt remove
sudo apt remove –purge

apt remove removes the programs core files but keeps configuration files (user settings etc).

purge will remove everything to do with the program.

26
Q

What is dpkg and how does it differ to apt?

A

dpkg is the core tool used to install packages either through apt or without.
it is unique in that it doesn’t require the internet in order to do it’s job.