



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is a good beginning cheat sheet for people learning at a newer level about kali Linux set up and the commands. It's a great little help to start your terminal coding career oath.
Typology: Cheat Sheet
1 / 7
This page cannot be seen from the preview
Don't miss anything!




cheat sheet
to standard output awk '[pattern] {print $0}' [filename] (^) Print all lines matching a pattern in a file diff [file1] [file2] (^) Compare two files and display differences
source [filename] Read and execute the file content in the current shell
[command] | tee [filename] >/dev/null Store the command output in a file and skip the terminal output
cd ~ Change the directory to the user's home directory. cd .. (^) Move one directory level up (parent directory). cd - (^) Switch to the previous working directory. find. -type f -exec du -h {} + | sort -rh | head -n 1 find the largest files in linux
Absolute Path vs Relative Path
/home/user/documents/file.txt /var/www/html/index.html /usr/bin/python
documents/file.txt ../parent_directory/file.txt subdirectory/subfile.txt
Linux file system
Directory Description Example /bin (^) Essential user binaries (commands) /bin/ls , /bin/cp , /bin/mkdir /boot (^) Boot loader files and kernel images /boot/vmlinuz , /boot/initrd.img /dev (^) Device files for hardware devices /dev/sda , /dev/tty , /dev/null
/etc System configuration files and directories /etc/passwd , /etc/hosts , /etc/ssh
/home (^) Home directories for regular users /home/user1 , /home/user
/lib Shared libraries needed by system binaries
/lib/libc.so.6 , /lib64/ld-linux-x86- 64.so.
/media Mount point for removable media devices
/media/usb , /media/cdrom
/mnt Temporary mount point for other file systems /mnt/external , /mnt/iso
/opt Optional application software packages /opt/java , /opt/apache
/proc Virtual file system containing kernel and process information /proc/cpuinfo , /proc/meminfo
/root (^) Home directory for the root user /root/.bashrc , /root/.profile
/run Run-time data for processes (e.g., PID files, sockets) /run/lock , /run/user/
/sbin Essential system binaries (usually for system administration tasks) /sbin/ifconfig , /sbin/reboot
/srv Data for services provided by the system /srv/www , /srv/ftp
/tmp (^) Temporary files /tmp/tempfile , /tmp/socket
/usr
User-related programs and data, including user/binaries, libraries, and documentation
/usr/bin/gcc , /usr/share/man
/var Variable data, such as log files, spool files, and temporary files /var/log/syslog , /var/spool/mail
755 rwx r-x r-x