Networknet archive Blog

Kali: Essential terminal commands

Originally published Last updated

During my Cyber Security studies, I am using Kali Linux to learn the operating system and the commands I need. I maintain this list as a reference for my research and what I have learned.

Find files from the terminal

  1. Run sudo updatedb.
  2. Search for files with wallpaper in the filename and a .png extension: locate *wallpaper*.png.

Find the target of a symbolic link

Bash2 lines
1
2
readlink -f /usr/share/wallpapers/KaliSmallLogo/contents/images/1600x1200.png
/usr/share/backgrounds/kali/kali-small-logo-4x3.png

Inspect a file header

I use xxd with the file path and pipe its output to head to see the first 10 lines. The file command provides a more readable description of the file type.

Code8 lines
1
2
3
4
5
6
7
8
xxd /var/lib/inetsim/http/fakefiles/sample.jpg | head
00000000: ffd8 ffe0 0010 4a46 4946 0001 0101 0048 ......JFIF.....H
00000010: 0048 0000 ffe1 0016 4578 6966 0000 4d4d .H......Exif..MM
00000020: 002a 0000 0008 0000 0000 0000 fffe 0017 .*..............


 file /var/lib/inetsim/http/fakefiles/sample.jpg
/var/lib/inetsim/http/fakefiles/sample.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment length 16, Exif Standard: [TIFF image data, big-endian, direntries=0], comment: "Created with The GIMP", baseline, precision 8, 200x150, components 3