Kali Linux Cheat Sheet1. Basic Commands:
- pwd: print working directory
- ls: list directory contents
- cd: change directory
- mkdir: creates a directory
- mv: moves a file
- cp: copies a file
- rm: removes a file
- cat: view contents of a file
- pirohackz: subscribe our telegram
- less: view contents of a file one page at a time
- more: view contents of a file one page at a time
- grep: search for text within files
- find: search for files
- chmod: change file/directory permissions
- man: view help/manual page for a command
2. Network and Security:
- ping: send ICMP echo request to host
- traceroute: show path of network hops
- pirohackz: subscribe our telegram
- netstat: show routing table and active connections
- nmap: Network Mapper (scanner)
- ifconfig: view/modify network interfaces
- tcpdump: capture network traffic
- wireshark: graphical network traffic analyzer
- arp: view arp table
- SSH: secure remote login
- WEP/WPA: wireless encryption protocols
- iptables: configure Linux firewall
- nessus: vulnerability scanner
3. System Administration:
- df: shows free/used disk space
- free: shows free/used system memory
- top: show running processes
- ps: show running processes
- uname: show system information
- uptime: show system uptime
- init: manage system run levels
- chown: change file/directory ownerships
- crontab: manage cron jobs
- pirohackz: subscribe our telegram
- useradd: add new user
- userdel: delete user
- groupadd: add new group
- groupdel: delete group
pwd
Explanation: Prints the current working directory (shows where you are in the file system).
ls
Explanation: Lists the files and directories in the current directory.
cd
Explanation: Changes the current directory to the one specified.
mkdir
Explanation: Creates a new directory.
rmdir
Explanation: Removes an empty directory.
rm
Explanation: Deletes a file.
rm -r
Explanation: Deletes a directory and all its contents.
cp
Explanation: Copies files or directories from the source to the destination.
mv
Explanation: Moves or renames a file or directory.
touch
Explanation: Creates an empty file or updates the timestamp of an existing file.
cat
Explanation: Displays the contents of a file in the terminal.
nano
Explanation: Opens a file in the terminal editor (nano) for editing.
man
Explanation: Displays the manual (help) page for a command.
clear
Explanation: Clears the terminal screen.
history
Explanation: Shows a list of previously used commands.
sudo
Explanation: Executes a command with administrative (root) privileges.
exit
Explanation: Closes the terminal session.
File Permissions
chmod
Explanation: Changes the file permissions (e.g., chmod 755 file gives read/write/execute permissions to the owner).
chown :
Explanation: Changes the owner and/or group of a file.
Networking Commands
ifconfig
Explanation: Displays information about your network interfaces (IP address, etc.).
ip a
Explanation: Shows the IP address and network configuration for all interfaces.
ping
Explanation: Sends a ping to a target to check if it's reachable.
netstat -tuln
Explanation: Shows open ports and listening services on your machine.
nmap
Explanation: Scans a target IP for open ports and services.
traceroute
Explanation: Traces the route packets take to a destination.
curl
Explanation: Fetches the content of a URL (can be used for testing web servers).
wget
Explanation: Downloads a file from a URL.
ssh @
Explanation: Connects to a remote machine securely via SSH.
scp @:
Explanation: Securely copies a file from your local machine to a remote machine.
route
Explanation: Displays or modifies the network routing table.
Process Management
ps aux
Explanation: Displays all running processes on your system.
top
Explanation: Shows real-time system resource usage and running processes.
kill
Explanation: Terminates a process by its process ID (PID).
killall
Explanation: Terminates all processes with the given name.
htop
Explanation: An enhanced, interactive process viewer (better visual than top).
System Information
uname -a
Explanation: Displays detailed information about your system (kernel version, architecture, etc.).
df -h
Explanation: Displays disk usage and available space for all mounted filesystems.
free -m
Explanation: Shows memory usage (RAM) in megabytes.
uptime
Explanation: Displays how long the system has been running and its load average.
lscpu
Explanation: Displays detailed information about the CPU architecture.
lsblk
Explanation: Lists all block devices (hard drives, partitions, etc.).
Package Management
apt update
Explanation: Updates the package lists for the repositories.
apt upgrade
Explanation: Upgrades installed packages to the latest available versions.
apt install
Explanation: Installs a package (e.g., apt install nmap).
apt remove
Explanation: Removes an installed package.
apt search
Explanation: Searches for a package in the repositories.
dpkg -l
Explanation: Lists all installed packages on the system.
dpkg -S
Explanation: Finds the package that installed a particular file.
apt-cache show
Explanation: Displays detailed information about a package.
Networking Tools
nmap -sS
Explanation: Performs a stealth SYN scan on the target to find open ports.