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