Cheatography
https://cheatography.com
a range of techniques and tools necessary for pentesting and preparing for certifications like the OSCP exam.
This is a draft cheat sheet. It is a work in progress and is not finished yet.
file/directory paths in linux
Path |
Description |
/ |
Root directory |
/home |
Home directories for users |
/root |
Home directory for the root user |
/etc |
System configuration files |
/bin, /sbin |
System binaries |
/usr/bin, /usr/sbin |
User-installed binaries |
/var/log |
System and application logs |
/var/tmp |
Temporary files that persist after a reboot |
/var/www/html |
Default Apache web root directory |
/dev |
Device files (e.g., /dev/null, /dev/sda) |
/lib, /lib64 |
Shared libraries |
/boot |
Bootloader and kernel-related files |
/mnt, /media |
Mounted drives and removable media |
/proc |
Virtual file system for system processes |
/sys |
Kernel-related virtual filesystem |
/tmp |
Temporary files (cleared on reboot) |
~/.ssh |
SSH configuration files and keys |
/etc/passwd |
User account information |
/etc/shadow |
Encrypted password storage (root access required) |
/etc/hosts |
Local DNS resolution file |
/etc/hostname |
System hostname configuration |
/etc/network/interfaces |
Network interface configuration (Debian-based systems) |
/etc/resolv.conf |
DNS resolver configuration |
/etc/fstab |
Filesystem mount information |
|
the command line
sudo apt update |
update package lists |
sudo apt upgrade -y |
upgrade installed packages |
sudo apt install <package> |
install a package |
sudo systemctl restart <service> |
restart a service |
sudo systemctl enable <service> |
enable service at boot |
passwd <user> |
change password |
shutdown -h now |
shut down system immediately |
reboot |
reboot the system |
|