MEH Security

Basic Kali directory transversal and file creation

In club on 9/25/2019, we learned how to move around in a linux environment. The following commands are the takeaway from this tutorial, and you will use them regularly as you learn more about linux and move throughout the environment.

touch - Make file in current Directory

root@kali~# touch newfile.txt

ls - list files in directories

root@kali~# ls or ls -l to list files with permissions

mkdir - Make a directory(folder)

root@kali~# mkdir newfolder

cd - Change directory(ex. cd folder1)

root@kali~# cd newfolder

nano - Zach's preferred text editor(other options are vim, leafpad if you like GUI)

root@kali~# nano newfile.txt

rm(rm -r) - remove file / remove recursivly (everything in the folder and the folder itself)

root@kali~# rm newfile.txt or rm -r newfolder

cat - concatenate - list the contents of a file

root@kali~# cat newfile.txt

.. - move backwards in directory when using cd

root@kali~/folder1# cd ..

So, these are the commands that we covered in class. The are very basic, but you will use them all the time.

However, these are not the only commands that are useful to know. Here are a few others I believe will help you to understand:

ifconfig - Shows IP addresses and connection information

root@kali~# ifconfig

netstat(-antp) - shows list of running services

root@kali~# netstat -antp

Here are some links to great resources you can use to learn more about linux and Kali itself: -A great resource to learn basically IT everything, but check out advanced penetration testing in particular