Basic Commands Kali Linux Flashcards

1
Q

This commands update all the apts and update it a basic update command

A

apt update

Don’t use apt-get

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

What command restarts your kali Linux machine,like windows restart button, or reboots it

A

reboot

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

What command prints the current directory you are in

A

Pwd

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

What command is know as list, and list the directory’s and files

A

Ls

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

What command shows hidden files and hidden directory’s

A

ls -la

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

What command clears the terminal so you can start at the top of the terminal again

A

clear

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

What command can put you in another directory, this command also stands for change directory

A

cd

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

What command can make files in a directory

A

touch

You can use this command by type I get any name you want to name the file after the touch command like this

touch file.txt

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

What command lets you remove files

A

rm

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

What command lets you make a directory/folder

A

mkdir

This command stands for make directory and you use it like

mkdir kali

You can use any name I just used kali for example

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

Are directory’s and files different colors

And what color are executable files

A

YES

In kali 2020.4 files are WHITE and directory’s are BLUE
Executable files are Green

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

What command do you use to remove a directory

A

rm kali -r

I used kali as a directory use any directory there though but to remove a directory you must put a -r at the end

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

What command deletes all the files in a directory

A

rm * -r

This command can be dangerous if you type it in the root directory you will delete most of the files on kali Linux

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

What command can take you out of a directory or lead you a directory back one

A

cd ..

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

What command tells who the current user of a terminal is

A

whoami

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

What command do you use to run a program, possibly one you made or something with nano

A

./

Example

./program.py

If it doesn’t work use the chmod commands to fix it

17
Q

What do the 3 letters stand for beside files RWX you will se this when typeing in ls -la

A

r - read

w - wright

x - execute

18
Q

What command lets you change the properties of files and like letting it be executable

A

chmod

To make a file executable you must add the x, in the rwx thing so to make a file executable you would type

chmod +x program.py

I used program.py for an example use any file or program thing you want for this

19
Q

What command prints out contes from a file in a terminal

A

cat

To use this command here is an example

cat program.py

Use any file you what to cat but after that command you will now be able to see all the contents that were in that file.

By the wya if you just type cat on it’s own to get out of it just type ctrl c on the keyboard and it will take you out of it

20
Q

If you want to see all of the process running in real time on your kali Linux what command do you use

A

Top

21
Q

What command lets you put text in a file or rewright text in a file

A

echo

Now be careful when useing echo if you use it on a file that already has text it will remove that text and just put your text, here’s and example of how to use it though

echo sup > words.txt

So you can use and file and any words or sentences after echo that you want to use but that it for echo

22
Q

What command upgrades all of your tools to the newest update and updates all the packages

A

apt upgrade

Don’t use apt-get

23
Q

What command shows all the commands you have ran in the past

A

History

24
Q

What command lets you copy files

A

cp

This command lets you copy files and here’s an example of how to copy a file to another directory

cp program.py test

This command just copied the file to another directory so now you have 2 copy’s of this file

25
Q

What command moves files to other directorys

A

mv program.py test

It is now moved to that folder

26
Q

What command lest your rename files

A

mv program.py anothername.py

So mv is also used to move files but you can rename files with it to by doing this and it keeps them in the same directory, as long as the name at the end isn’t a directory

27
Q

What command show options or a manual for a command

A

man cat

You can now see things you can do with cat

28
Q

What command lets you locate a file name with a word you might want to use

A

locate

You could use this command like this

locate word

It would the show all files that involve the word, word😂

29
Q

What command do you use to shutdown kali Linux from the terminal

A

shutdown then it will show how long it has left till it shuts down

To cancel the shutdown type this command

Shutdown -c

30
Q

What command do you use to restart or reboot kali Linux

A

reboot

31
Q

What command show the current process running in the terminal you have open

A

ps

32
Q

If you want to see all of the process running in real time on your kali Linux what command do you use

A

top

33
Q

What tells you your operating system in kali Linux

A

uname

If you want to know the whole name of your os the you just put this command

uname -a

34
Q

What command shows your private IP address and other network info

A

Ifconfig

35
Q

What command shows the gateway IP address and some other network info

A

netstat -nr

36
Q

What command shows your current tcp connections

A

netstat -antp

TCP connections will basically show when your run something in the internet like tor or like Firefox or any program with internet

Here’s is what it looks like when you are not connected to any internet programs or browsers

This below is what it look like when you are connected to them you see it says established on the right on all them

Now wanse you down you can run the command again and it should no longer say you established

As you can see above it just says time wait not established good

You can find the pictures for this by looking up the card in notes

37
Q

What command closes and exits the terminal

A

Exit