Basic Commands Kali Linux Flashcards
This commands update all the apts and update it a basic update command
apt update
Don’t use apt-get
What command restarts your kali Linux machine,like windows restart button, or reboots it
reboot
What command prints the current directory you are in
Pwd
What command is know as list, and list the directory’s and files
Ls
What command shows hidden files and hidden directory’s
ls -la
What command clears the terminal so you can start at the top of the terminal again
clear
What command can put you in another directory, this command also stands for change directory
cd
What command can make files in a directory
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
What command lets you remove files
rm
What command lets you make a directory/folder
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
Are directory’s and files different colors
And what color are executable files
YES
In kali 2020.4 files are WHITE and directory’s are BLUE
Executable files are Green
What command do you use to remove a directory
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
What command deletes all the files in a directory
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
What command can take you out of a directory or lead you a directory back one
cd ..
What command tells who the current user of a terminal is
whoami
What command do you use to run a program, possibly one you made or something with nano
./
Example
./program.py
If it doesn’t work use the chmod commands to fix it
What do the 3 letters stand for beside files RWX you will se this when typeing in ls -la
r - read
w - wright
x - execute
What command lets you change the properties of files and like letting it be executable
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
What command prints out contes from a file in a terminal
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
If you want to see all of the process running in real time on your kali Linux what command do you use
Top
What command lets you put text in a file or rewright text in a file
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
What command upgrades all of your tools to the newest update and updates all the packages
apt upgrade
Don’t use apt-get
What command shows all the commands you have ran in the past
History
What command lets you copy files
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
What command moves files to other directorys
mv program.py test
It is now moved to that folder
What command lest your rename files
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
What command show options or a manual for a command
man cat
You can now see things you can do with cat
What command lets you locate a file name with a word you might want to use
locate
You could use this command like this
locate word
It would the show all files that involve the word, word😂
What command do you use to shutdown kali Linux from the terminal
shutdown then it will show how long it has left till it shuts down
To cancel the shutdown type this command
Shutdown -c
What command do you use to restart or reboot kali Linux
reboot
What command show the current process running in the terminal you have open
ps
If you want to see all of the process running in real time on your kali Linux what command do you use
top
What tells you your operating system in kali Linux
uname
If you want to know the whole name of your os the you just put this command
uname -a
What command shows your private IP address and other network info
Ifconfig
What command shows the gateway IP address and some other network info
netstat -nr
What command shows your current tcp connections
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
What command closes and exits the terminal
Exit